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 — composing the background screen

In the background screen, you will see a grid for all the gems. On the right side of the grid, you will also see the current score displayed, along with the time which is remaining to play this game.

  1. Insert a new method called CreateBackgroundScreen into the game class.
    Method CreateBackgroundScreen:Int ()
    
  2. Set the default layer for this method.
    eng.SetDefaultLayer(layerBackground )
    
  3. Start two new FOR loops—one for the rows (x) and one for the columns (y).
    For Local y:Int = 1 To rows
    For Local x:Int = 1 To columns
    

    In the next few pages, you will see the integer value 64 used many times. It is the length of the edge of all sprites that we will load.

  4. Now, load the grid sprite from the atlas image. The ...

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