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

And action!—the engine class

The callback methods of the engine class are the ones that will finally control the player machine and check for collisions. They will also be responsible for what happens when a level has finished its fading out transition. We could also have checked for the winning conditions here, but have chosen to do it inside the OnUpdate method of the game class. You see that there is no strict rule to it. And that is a good thing!

Move it… object updates

To control the player's machine, we will detail the OnObjectUpdate callback method of the fantomEngine framework. Every time an object gets updated, fantomEngine will make a call to this method with the object as a parameter.

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