Developing your own map loaders and renderers

What if Tiled or any of the other supported editors do not suit your needs? After all, they are all based on tiles and not all games use the same approach for their levels. Take the popular game Braid, for example, where levels are made of nonsquare images. You might want to use a different tool to edit levels or even roll out your own editor!

Luckily enough, Libgdx's 2D maps API is fully extensible. That is the beauty of this framework: simple, clean, and extensible. It does not impose a single way of doing things.

Throughout this recipe, you will learn how to easily add full support for bespoke level formats.

Getting ready

This recipe does not come with a code sample, so you do not need to prepare anything ...

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.