Dealing with the life and death of the player

As this is a game about survival, we will want the win/lose condition to be fairly simple. For the win condition, we will make the player survive for a set amount of time. The lose condition will be the player dying, but we don't want to come across as too hard to play, so we will give the player three lives. This means that we are going to need to respawn the player. Finally, to get this to work properly, we will need to give the Overlord some more duties.

Setting up the win condition

The win condition for this game is to survive for a set amount of time. We can achieve this through the use of an alarm and a variable to signal to the Overlord that the player has survived.

  1. We will need to set up some ...

Get HTML5 Game Development with GameMaker now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.