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

**URL:** <https://discourse.mapeditor.org/t/best-way-to-use-tiled-with-texture-packer-custom-game-engine/361>\
**Category:** Questions\
**Created:** [February 21, 2015, 3:32pm UTC](https://discourse.mapeditor.org/t/best-way-to-use-tiled-with-texture-packer-custom-game-engine/361 "2015-02-21T15:32:36Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![sumowrestler](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sumowrestler](https://discourse.mapeditor.org/u/sumowrestler)\
**Post date:** [February 24, 2015, 9:59pm UTC](https://discourse.mapeditor.org/t/best-way-to-use-tiled-with-texture-packer-custom-game-engine/361/11 "2015-02-24T21:59:18Z")

</div>

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 😄.

---

_[View the full topic](https://discourse.mapeditor.org/t/best-way-to-use-tiled-with-texture-packer-custom-game-engine/361)._
