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

Our lovely game objects

Like every game, Balls Out! is made out of several objects that may or may not have their own life, of course, only if you code them to have a life. So which objects are part of the game?

Layers

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

  • Background
  • Game
  • Title screen

The background layer will hold some info text and simple, colored rectangles. The title screen is just that with two extra buttons to start a game or to leave it completely. And the game layer will hold the main game objects, such as the balls, the enemies, and the tiles. Also, the particle effects will use the game layer. Just as a little reminder, with layers you can group sprites to handle them in one batch. Layers also control the order in which sprites ...

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