O'Reilly logo

Lua Game Development Cookbook by Mário Kašuba

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

Using tiles and tilesets in the game

Tiles are usually referred to as small subimages that are part of a bigger image. Tiles usually have the same size, so they are easily compacted into one rectangular area. You can see tiles mostly in 2D games, especially in platform games, RPGs and even 3D action games. The rectangular property makes tiles very efficient in the question of accessing specific subimages from a large tileset. You can store the whole tileset into the graphical memory, and with the knowledge of the subimage positions, you can easily select the tiles you need.

You can observe that many small game animations consist of a connected set of tiles—called tileset. Tilesets can define an animation as an ordered list of tile indices. Tile ...

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