This wiki has been moved to into the mediawiki branch.

Game object

From SuperTux
Revision as of 00:54, 28 June 2006 by Sommer (Talk | contribs)

Jump to: navigation, search


A diagram illustrating the planned design for the GameObjects

This is the most basic class for objects in the game. Nearly everything should inherit from this class. All GameObjects are stored in a list by the engine. This list will be traversed 2 times per frame. First the action function is called on each object, and then the draw function of each object is called.

The class also contains a flag that indicates if the object should be removed at the end of the frame. You can call remove_me() to set this flag.


These are objects you can interact with. The objects will have an area in the world. And you can send interaction events to them. Typical interaction events will be activate/push, ~EnterArea/touch, ~LeaveArea, hit with object


This class provides a position and functions for collision detection. All Moving objects are held in a separate list by the engine which is also traveled once (between action and draw calls) for collision detection.