O'Reilly logo

Developing Mobile Games with Moai SDK by Francisco Tufro

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

Our first image

The first thing we need to do is to have an actual image. We'll use the back of a tile from our Concentration game in this example, you can get it from the book's website, along with the full source code for this example.

To begin with, we need a layer. A layer groups together one or more Props and serves as a way to control rendering priorities between different Prop sets. For example, you can have one layer for the background and another one on top of it for the objects, and when you add a new Prop on the background layer, it will be displayed below the Props on the objects layer.

Note

MOAILayer inherits from MOAIProp, so you can think of it as a Prop that groups other Props. You can call any of the methods of MOAIProp on a layer. ...

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