O'Reilly logo

Monkey Game Development by Michael Hartlef

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Game objects

Like every game, Chain Reaction is made out of several objects. Let's go through them one by one.

Layers

In this game we will use only three layers (groups):

  • Background
  • Game
  • Title screen

These layers help us to draw the game objects in the correct order, draw only the ones needed for a certain game mode, and also reduce the amount of objects to be checked during collision detection.

Title screen

The title screen of our little game is an image with the title written on it and with a a button to start the game. As the button is already drawn on it, we will utilize a new feature of the fantomEngine, a Zone object. You can use a zone object to detect collisions on it and also check for touch events.

Game background

The game background screen ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required