The MainLoop is heart of most video games and simulations.
The Main loop runs in World.MainLoop() which is called by default from World::GameInit(). By default this Method also starts the render, the physics andthe input systems. It does very little on it's own. The main loop then calls the PreMainLoopItems(), DoMainLoopItems and PreMainLoopItems(), for each manager in the order of their priority from Lowest to Highest.
Here is a listing of default priorities for each of the managers the a world intantiates by default: -50 User Input and events -40 Actors -30 Physics -20 Camera -10 Lighting (Not yet implemented) 0 Graphics 10 Sound 20 Resources
1.7.3