In 0.7, the game controller became hard to understand, at least for someone used to the 0.6 code. The term "round" is replaced by "match" for example, and the number of switch/if related to the state of the game is exaggerated.
I think we could remove most of the features done by the game controller (TeamBalancing for example is useless for half of gamemodes). The different phase (paused, running, end_match, end_round, ...) could be handled using classes (CMod_GameStateXXXX) instead of the abusive switch-based system. Each CMod_GameStateXXXXX could have a Snap() function and a Tick() function.
That way, it will be much more flexible to change the phase of the game. You can even make pure solo game by running one State per player if you want. You can also add new phase if you need. The only constraint is to fill the CNetObj_GameData correctly in the Snap() function of each GameState. Of course, we can create some templates to imitate vanilla gamestyle and help modders.
Other point: some feature of the Player must be moved in the GameController: Snap function (to fake easily informations about players), team information (this could be done using an array in the game controller, allowing to name team as you want, or to increase the number of team), spawn system, ...
Please discuss these points, I think it's important ^^
In 0.7, the game controller became hard to understand, at least for someone used to the 0.6 code. The term "round" is replaced by "match" for example, and the number of switch/if related to the state of the game is exaggerated.
I think we could remove most of the features done by the game controller (TeamBalancing for example is useless for half of gamemodes). The different phase (paused, running, end_match, end_round, ...) could be handled using classes (CMod_GameStateXXXX) instead of the abusive switch-based system. Each CMod_GameStateXXXXX could have a Snap() function and a Tick() function.
That way, it will be much more flexible to change the phase of the game. You can even make pure solo game by running one State per player if you want. You can also add new phase if you need. The only constraint is to fill the CNetObj_GameData correctly in the Snap() function of each GameState. Of course, we can create some templates to imitate vanilla gamestyle and help modders.
Other point: some feature of the Player must be moved in the GameController: Snap function (to fake easily informations about players), team information (this could be done using an array in the game controller, allowing to name team as you want, or to increase the number of team), spawn system, ...
Please discuss these points, I think it's important ^^