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

The game objects

Like it was stated earlier, CometCrusher will feature a few game objects. Most of them won't be stationary and all behave differently in the game.

Each object will be created via a call to the CreateLayer, CreateImage, LoadSound, or LoadFont methods of fantomEngine.

So let's talk about them one by one.

Layers

The game will feature a few layers (groups). Each layer groups several objects. Thus, it makes sense to group objects that need to be handled together. The collision detection of fantomEngine will only work with objects that are in the same layer.

All layers are rendered in the order of their creation. The same goes for the corresponding objects in each layer, unless they are a child of an object.

For the game, we will have ...

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