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

Chapter 7. Concentration Gameplay

After talking a little bit about assets and having our ResourceManager in place, we'll start building the Concentration gameplay. We'll talk about input handling, basic animations, and game states. These are the basis of gameplay implementation and will be useful from the smallest to the biggest game you develop using Moai SDK.

Grid

The first thing we're going to do is to display a grid of tiles that will be our playground. Just to start with, we'll display the back of the tiles.

Tilemaps

A commonly used technique in game development is the implementation of tilesets.

The idea is to create one image that includes more than one asset in it.

We're going to create a tileset called tiles.png. It consists of 12 tiles, 11 ...

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