Search code examples
javadictionaryeditortile

How do you use Tiled object layer?


I'm not really sure if this is the place to be asking this but I was trying to use the program Tiled but I'm not sure where to start. I have looked at its documentations but it's not that useful as I already have some experience in using a tiled editor in a game engine (GameMaker), but I'm working straight up Java for this project.

How does the Tiled object layer work? Does it allow me to place enemies in the tiled editor that would show up and actually move in the game or are they just static images like a tile?

Also if it does allow what I programed for the enemy how do I use it?


Solution

  • Tiled allows you to edit layers of tiles and items. There's tile layers which represent a 2D grid of images, and item layers which are just polygons with properties.

    After you create a map, its up to you to do something with that data. Tiled is not like GameMaker. All Tiled does is allow you to read, write, and edit data.

    I recommend you use LIBGDX as a game engine, and Tiled to create your maps. LIBGDX has support for loading and rendering tiled maps.

    To create enemies, you'd place some polygons, add attributes to these polygons, and create enemies based on these properties when parsing the Tiled map in your game.