After mostly working individually on our initial game prototypes, this past week was dedicated to combining together all of our work that was done in parallel. Good o’ parallelism. Much efficient.
Since each of us created a replica of the same game, this naturally resulted in our game assets being very similar. This made it easier to combine projects. I decided to use my game as the base and import the best parts of everyone else’s game.
Another group member had already made a main menu and game over screen. We had the parts, but they just weren’t tied together into a coherent game that flows. As a goal of having a minimum viable prototype, this means it was time to design an architecture.



When designing the architecture of our game, I had to keep in mind 2 things:
1) The player’s total score and number of remaining lives must be tracked as the player progresses through different levels.
2) Design an architecture that easily allows for adding new levels.

The diagram above shows a high-level flowchart of the architectural design I decided to implement. The game can only start from the scene titled “Main”. This is the root scene that contains global scripts that will control which scenes get loaded and unloaded. This Main scene holds the “GameController” script, which will be the main driver for the game. The GameController keeps track of the player’s score and lives, and controls when scenes are loaded and unloaded. The scenes are loaded additively, so the Main scene stays loaded the entire time.
In contrast, each separate level must have its own local controller, called the “LevelHandler”. This controller uses the “LevelHandler” script, and contains all of the game’s assets as children in its hierarchy.
The LevelHandler must have a “BrickManager” as one of its children elements. The BrickManager uses the “BrickManager” script, and is responsible for creating the brick layout of the level, as well as destroying the bricks, and re-constructing the level if necessary. Both of these components are required because the root GameController component utilizes them to control the game.
To add a new level, you would add a new method that constructs the level’s brick layout inside the BrickManager script. You would also need to add the new scene to the project’s File > Build Settings, and to the corresponding Enum of Scene names in the SceneLoader (not shown).
That’s about it for this week’s update. Stay out of trouble y’all.