Download Media Create Donate Forums

2010/05/09

Tiled

Today I tried using Tiled to edit maps for OSARE. It took a bit of work to set up, but I think it's worth it.

My maps use CSV for tile data. The latest Tiled release (0.4.1) supports writing map layers in CSV. So I can use Tiled to edit maps, then just grab the piece I need from the output XML file.

Tiled expects tilesets to have consistent tile sizes/spacing, but I pack tiles in my tileset to save space. So I made a new tileset image for my dungeon tiles where each tile is 64x128. Tiled handles this tileset beautifully. I still use the packed tileset for my game, for performance.

Tile index 0 is blank space in Tiled and in my engine. The first tile on the tileset image is given index 1, so I have to position the tiles accordingly.

Also, the CSV map format uses decimal; OSARE uses hex. The easiest thing is to allow map files to define the layer format it uses, that way I can copy/paste layer data directly from Tiled files.

Tiled will be great for laying out the map graphics. With a bit of tinkering I think I can make enemies and events with Tiled's Object Layer.

Check out this map I'm working on and the accompanying dungeon tileset.