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 of Tiled for your operating system from http://www.mapeditor.org/download.html.
We are going to use the Base tileset pack created by Kenney and available under the Creative Commons Zero license at http://www.kenney.nl/assets.
Make sure the samples
projects...