Page 1 of 1

Extend Tiled Component

PostPosted: Sat Dec 14, 2013 12:38 pm
by StuartTresadern
The Tiled Component works great for visible (texture) layers but i have found that the object layer in tiled is very time consuming to simply mark the tiles as occupied or add additional data.

Currently I add a property to the layers isDataLayer or isCollisionLayer in Tiled which are simply set to true or false. I use a semi transparent dummy tile set to mark the tiles which just makes it easier to layout. When i load the layers I can then detect if its a data type layer and create a TileMap rather than a TextureMap. In addition the tileset would not need to be loaded for that layer. Currently I am not reading the Tile Data but the idea would be to add properties to each of the tiles and read that in if its a DataLayer, of course the tiledata can be used on texture maps for thinks like changing the sound based on the surface type the character is walking on.

Personally it seems a lot faster to layout tile based detection data, rather than using the Tiled object layer.