This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.
The SuperTux game engine is structured as follows:
- On startup, main.cpp instantiates a single MainLoop (mainloop.cpp) that is run until the application terminates.
- The MainLoop manages, updates and draws all Screens, Controllers, Menus and the Console.
- A Screen (screen.hpp) is the abstract base class for code that the MainLoop runs exclusively and full-screen.
- Probably the most important Screen is the GameSession (game_session.cpp), which actually runs a Level (level.cpp).
- Examples of other Screens are:
- 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.