Creating maps with Tiled and loading them into Libgdx

During our first contact with the Libgdx maps API, we will create a simple level with the Tiled map editor, load it into our game, and render it as part of our game loop. Tiled is a very popular, cross-platform, freely available, open source tile-based editor.

Note

Tile-based maps are levels made out of small texture blocks called tiles. Combining tiles from a reduced set, complex and interesting results can be achieved while saving texture memory.

There is not much you need to know to start working with Tiled maps in your game. You will soon realize how extremely simple the process is, as Libgdx, very kindly, does all the hard work for you!

Getting ready

Download and install the latest version ...

Get Libgdx Cross-platform Game Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.