Book Image

Libgdx Cross-platform Game Development Cookbook

Book Image

Libgdx Cross-platform Game Development Cookbook

Overview of this book

Table of Contents (20 chapters)
Libgdx Cross-platform Game Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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 special before carrying on. Nevertheless, it is highly advisable that you understand all the concepts previously explained in this chapter.

How to do it…

Let's say you want to use an editor that is currently not supported by Libgdx. You will have...