Difference between revisions of "GameTools Object"

From Wikiid
Jump to: navigation, search
(New page: This library manages game objects - people, cars, buildings, penguins...everything. == class BasicObject == A ''BasicObject'' is a single 3D model with an identifier and some bounding box...)
 
 
Line 15: Line 15:
  
 
...allow you to efficiently search for objects using either their string name - or a numerical handle.
 
...allow you to efficiently search for objects using either their string name - or a numerical handle.
 +
 +
== Object states ==
 +
There are three state variables that are extremely useful to Java plugins that control objects in the game:
 +
 +
* floating - the object is bobbing around between air and water, perhaps swimming, perhaps just floating naturally.
 +
* submerged - in water, either on the surface, in the body of water or standing on the bottom of the water.
 +
* freeFall - free-falling in air or water, not in contact with the ground or the water surface.
 +
 +
A combination of these three flags tells you a lot:
 +
 +
{| border="1" cellspacing="0" cellpadding="5" align="center"
 +
  ! State
 +
  ! floating
 +
  ! submerged
 +
  ! freeFall
 +
  |-
 +
  | On the ground
 +
  | No
 +
  | No
 +
  | No
 +
  |-
 +
  | Falling through the air
 +
  | No
 +
  | No
 +
  | Yes
 +
  |-
 +
  | On the bottom of the ocean
 +
  | No
 +
  | Yes
 +
  | No
 +
  |-
 +
  | Sinking or rising through water
 +
  | No
 +
  | Yes
 +
  | Yes
 +
  |-
 +
  | Impossible?!?
 +
  | Yes
 +
  | No
 +
  | No
 +
  |-
 +
  | Impossible?!?
 +
  | Yes
 +
  | No
 +
  | Yes
 +
  |-
 +
  | Swimming on surface of water
 +
  | Yes
 +
  | Yes
 +
  | No
 +
  |-
 +
  | Impossible?!?
 +
  | Yes
 +
  | Yes
 +
  | Yes
 +
  |-
 +
  |}
 +
  
 
{{gameTools}}
 
{{gameTools}}
 
{{LoL}}
 
{{LoL}}

Latest revision as of 07:12, 20 February 2008

This library manages game objects - people, cars, buildings, penguins...everything.

class BasicObject

A BasicObject is a single 3D model with an identifier and some bounding box data. All BasicObjects are are maintained in a searchable global list.

 class BasicObject
 {
 } ;

Utility Functions

Two functions:

 BasicObject *findObject ( unsigned int handle ) ;
 BasicObject *findObject ( const char *name ) ;

...allow you to efficiently search for objects using either their string name - or a numerical handle.

Object states

There are three state variables that are extremely useful to Java plugins that control objects in the game:

  • floating - the object is bobbing around between air and water, perhaps swimming, perhaps just floating naturally.
  • submerged - in water, either on the surface, in the body of water or standing on the bottom of the water.
  • freeFall - free-falling in air or water, not in contact with the ground or the water surface.

A combination of these three flags tells you a lot:

State floating submerged freeFall
On the ground No No No
Falling through the air No No Yes
On the bottom of the ocean No Yes No
Sinking or rising through water No Yes Yes
Impossible?!? Yes No No
Impossible?!? Yes No Yes
Swimming on surface of water Yes Yes No
Impossible?!? Yes Yes Yes



Wikiid Pages relating to gameTools (edit)
gameTools - Main page
gameTools - Support Tools :
plb_to_ac3d, mklevel, mktile, mktree, tiled, autogen_java, mk3dgallery
gameTools - File Formats :
title_screen.rgb, ultimate.xml, material.xml, decoration.xml, physics.xml
tiled.xml, tiled_autotiles.xml, Level files, Tile naming scheme, PLB files
gameTools - Source Code :
Game functions: gameCamera, gameClock, gameChecksum/gameHashTable, gameHTTP,
gameIsect, gameJoystick, gameParticleManager, gameScreen/gameMouse,
gameSky, gameStarter, gameStrokeFont, gameUtils
Material database: MatList/MatEntry
Tile map handling: TileObject/MapFlag/MapEntry/Map
Java Interfacing: JavaLink
Image file loading: liImage/liImageFactory
3D Model file loading: loadPLB, PLB exporter
Physics: Sabot, Bullet, gameTools - Use with Blender, PLB exporter
Object management: Object


Wikiid Pages relating to Lemur of Lima (edit)
Lemur of Lima - Main page
Lemur of Lima - Controls
Lemur of Lima - Levels :
List of Levels, Level design, Screen shots, Models
Lemur of Lima - Java Plugins :
Java plugin API, Event handling, Flags, GameInterface API , Alphabetical Index
Lemur of Lima - Source Code Documentation :
Initialisation, Main Loop, gameTools