Controlling the game with the Overlord

In this game, we will be using the Overlord, the master controller of the game, to control the spawning of enemies, monitor the player's lives, and deal with the win/lose condition. The win condition will simply be to survive for two minutes against waves of enemies. The lose condition will be that the player runs out of lives.

Spawning waves of enemies

We need to start by creating the wave of enemies, so that the game is playable. For this, we will utilize a looping timeline to spawn the various enemies. We are going to have three different waves, each one spawning a different enemy every two seconds.

  1. Create three new scripts, and name them: scr_Wave_Strafer, scr_Wave_SpaceMine, and scr_Wave_FloatBot.
  2. We will ...

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.