Game Over Animation And Restarting

I am putting in all the plumbing to manage the game over state and restarting the game. Now, whenever the player is pushed off the screen I simply slow down time to give the illusion like all the obstacles and animations are stopped.


This is such an easy effect plus the TimeManager class will also allow me to pause and unpause the game. Finally, once the game is over I have some logic to clear the screen and spawn a new player. The only issue is that I don’t have a click lock in place so of course I found a good bug by just clicking as many times as I could before the game had officially started.


This was a quick one to fix. I just need to make sure I set my game started flag as soon as the first player is spawned.

Subscribe To My Mailing List

Want to learn how to make a game? Not sure where to start? Even if you are a seasoned game maker there is still a lot you can learn from my mailing list. I'll be covering tips and tricks for how to build, release and market games each month.

Simply sign up for my mailing list and also get access to a 50% off discount code for my eBooks and other content. I promise to not spam your inbox!

Join Now