Architecture - UO-DFM/SimCityOttawa-Documentation GitHub Wiki
Game Architecture
The primary architecture of the game is focused around "Managers" which are Singleton classes adapted to Unity. Most of the content in the game excluding the data objects are all single use, resulting in the many manager classes. These managers are represented by the top row with many classes.
The classes below managers are the data structure classes. There is currently only one custom data structure used for the game and is a data structure for handling of chronological events.
The bottom row depicts all the data objects which are used by the managers for the game loop.
(Cloud) Architecture
Previously the game architecture looked like this:
However, it was too complicated for the use case of the game. The mixture of 2- and 3-tiered architecture makes it hard to debug the code and also increases the amount of maintenance required for the code.
In order to better facilitate meeting the requirements of intelligently serving events (so that conflicts occur), event generation was moved from the cloud back to the players device. It was also decided that requiring an internet connection to play was a negative consequence which further encouraged moving code back into the local device. Going forward, the architecture is expected to look as follows: