Best way to use Tiled with texture packer/custom game engine?

Just to re-cap, To support texture packer I will do the following…

1 - I will create a tile set using “collection of images” tile set type
from a working assets directory containing images/animations.

Tiled will create a TMX file containing tile assets like:

<image source="../../../texturepacker/collectables/coin.png" width="32" height="32"/>

2 - I will use texture packer to pack that same directory, it will
create entries that map to the texture packer sprite sheet as:

 <SubTexture name="collectables/coin" x="2" y="2" width="32" height="32"/>

3 - I will load and parse the TMX file in my custom game engine, and parse the trailing image source starting at /texturepacker which leaves me with path :

 collectables/coin.png

This is the key I will use to lookup the sprite sheet atlas - trimming “.png”.

Help this helps @T1mL3arn, Thanks again @bjorn.

btw - What could be a cool feature is to be able to add smart directories to a tile set in the same way texture packer does, I.e. listen to local file changes and dynamically add new files/folders etc… obviously a different topic :smile:.

1 Like