This wiki has been moved to into the mediawiki branch.

Difference between revisions of "Game Engine"

From SuperTux
Jump to: navigation, search
Line 18: Line 18:
* [[Tile]]
* [[Tile]]
* [[Objects]]
* [[Objects]]
[[Category:Game Engine]]

Revision as of 18:26, 25 December 2007

The SuperTux game engine is structured as follows:

On startup, main.cpp instantiates a single MainLoop that is run until the application terminates.

The MainLoop manages, updates and draws all Screens, Controllers, Menus and the Console. A Screen is the abstract base class for code the MainLoop runs exclusively and full-screen.

Probably the most important Screen is the GameSession, which actually runs a Level. Examples of other Screens are: The SuperTux title screen, a world map or an intro text scroller.

A GameSession loads and runs a single Level, which consists of multiple, separate parts, the Sectors. Sectors contain the various GameObjects that can be encountered in SuperTux.

Examples of such GameObjects are the Badguys, Players and TileMaps, but also Thunderstorm controllers, the currently visible viewport (i.e. a Camera object), the sector's time limit, etc.

More in-depth information about the game engine can be found in the source code itself, e.g. as Doxygen HTML Documentation, or on pages in Category:Game Engine, most notably: