Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

6. Game #5, Balls Out! > Our lovely game objects

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 are drawn.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial