First Game Loop Complete
- mrraphael2117
- Oct 6, 2022
- 2 min read
I have been busy these past 2 weeks so I haven't had time to work on the game. But I did get a good amount of work done between September 18 - September 23. Here are some of the main things I have completed.
NEW IMPLEMENTATIONS
Ball Breaker game loop complete!!!
The Save/Load system has been put in place and works (saves high scores and in-game currency).
The base main menu has been implemented (includes the game title and basic UI elements).
Basic UI elements for displaying the high score and in-game currency.
Base UI for switching between the main menu, game scene, and exiting the application.
Basic pause menu is complete. Players can pause/resume the game, and go to main menu via the in-game pause menu.
Added a button that returns all current balls in the scene to the bottom (useful for when balls are bouncing completely horizontal from side-to-side).
Add ball power-up created and works, full implementation not yet complete.
GAMEPLAY
FEATURED CODE
One of the main things I wanted to solve early was to properly clean up the list of generated blocks. When a block is instantiated it gets added to the list that holds the generated blocks. The blocks get destroyed when their number reaches 0, however, the list of generated blocks still holds null references to the destroyed blocks. I created a function ("CleanUpBlocks") to solve this, using a lambda expression, the code gets rid of all the null references that are in the list of generated blocks. This function is called at the beginning of each round when the rows of blocks move down.

Overall I am really excited with the progress of the game and I am having lots of fun making it.
EXTRAS
A lambda expression is a short block of code that takes in a parameter and returns a value. Lambda expressions are like methods but they do not need a name and they can be implemented in the body of a method.
Comments