GameObjectBase -> Simple Object Class. Attaches itself to the root node, names itself. Very limited abilities. Can make something appear on the screen, can load physics data. Can react to objects colliding into it, supports armatures and armature collisions. Is aware of the world and by proxy is aware of all things in the world.
SimpleObject : GameObjectBase -> A simple object subclassed from GameObjectBase. Supports animation, intended for simple objects with limited purpose, such as trees, bushes, ect with only one animation.
ActiveObject: GameObjectBase -> An object that contains a library of animations, keeps track of its state. Capable of many different animations based on its State variable. States are handled via a Char (probably due to be lengthened) state var. For instance:
#define PS_IDLE 0
#define PS_WALK 1 // 01
#define PS_JUMP 2 // 10
#define PS_WALK_JUMP 3 //11
#define PS_STRIKE 4 // 100
#define PS_STRIKE2 8 // 1000
#define PS_STRIKE3 16 // 10000
#define PS_STRUCK 32 //100000
Various states are defined as bits in the State variable. States can be mixed by turning on multiple bits to achieve things such as the running jump attack. These various states correspond to an array of pointers to animation states that are the appropriate animation.
AIObject : ActiveObject -> Object with internal AI. Has second AI state variable that works on similar principles to standard State Variable. Is aware of the player.
PlayerObject: ActiveObject -> Object that is aware of keyboard input and reacts to it in various ways. Camera will follow this object, and react to things this object does.
Monday, December 1, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment