Quite a few improvements, though the codebase gets even more convoluted.
- I added explosions. This is pretty simple, just adding a
Explosionclass, and tracking delta-time against a set lifespan. An explosion will last 1/10th of a second, which I think is good enough. - I then added a score display. A score tracked by the main game class. When a player shoots down an asteroid, 1 will be added to the score.
- I added a main menu and pausing. Usually this would be done in a much nicer way, perhaps with an external library, but I decided to make a few simple screens and display them when variables are True. The player can pause with the Esc. key, and it will toggle a variable
pausedthat isFalseby default. I also have the main menu, which isTrueby default and is only toggled at the beginning. Finally, I have one for the game over screen, which isFalseby default and only toggles when the player has no more lives left. When any of these areTrue, the sprites will not update, and the game will only listen for input.
Overall, the game is basically done and I just need to polish it. I will likely be redrawing the sprites next.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.