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

Time for action — the basic structure of your game

We will now build the basic structure for every game. Follow the given steps:

  1. Your first command in Pongo, and in every game, should be the Strict command, so that Monkey will keep us on track regarding giving identifiers the right type.
    Strict
    
  2. Next should be some comments that describe the script somehow.
    #rem
    Script: Pongo.Monkey
    Description: Sample script from chapter #2 of the book "Monkey Game Development Beginners guide" by PacktPub
    Author: Michael Hartlef
    #end
    
  3. Because we want to use the Monkey built-in framework mojo, we have to import it.
    Import mojo
    
  4. Now, we need to create the pongo class that extends from mojo's app class. We will include empty OnCreate, OnUpdate, and OnRender methods that ...

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