The core manages the root and represents the whole game. It wraps the root, since the root class is just a data holder.
Destructs the root, freeing all resources
Inits an existing game by loading the raw savegame data and deserializing it. Also runs basic validity checks.
Initializes a new game, this means creating a new map and centering on the plaerbase
Initializes the render layers. Those are the cached layers for streets and thus
Initializes the root object which stores all game related data. The state is required as a back reference (used sometimes)
Should initialize all factions
Initializes the render canvas
Initializes the difficulty. Based on the difficulty we also compute a new balancing object.
Initializes the map layout. This is a bit hackish since it overrides the global globalConfig.numTiles(X|Y) and such. However, passing those to all classes etc is also a bit annoying.
Initializes the matchmode, also inits the factions
Handler when the map theme was finally loaded
Prepares the game to get gameover on next frame
Redraws the background layer
Switches into the given interaction mode