O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

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

Rendering a tile map with vertex buffer objects

What would a 2D game be without a map; more precisely a tile map. A tile map is a full-size map composed of small quad polygons or tiles mapped with a piece of image. These tiles are made so that they can be pasted beside, repeatedly. We are now going to implement a tile map to draw a background. The rendering technique is inspired from the Android game Replica Island (see http://replicaisland.net). It is based on vertex and index buffer to batch tile rendering in a few OpenGL calls (thus minimizing state changes).

Tip

Tiled map editor

Tiled is an open source program available on Windows, Linux, and Mac OS X to create your own custom tile maps with a friendly editor. Tiled exports XML-based files ...

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