Howto export to custom export formats

One of the most frequently asked questions seems to be the question whether Tiled supports the file format XYZ for exporting the map to.

Tiled is a very flexible tool and not limited to a single engine or file format. However there is no real standard file format for map files (well… except the ones Tiled defines :wink:), so people seem to be ending up implementing thousand different map formats for their own game/engine. Tiled of course cannot support all of those out of the box and comes with a small set of “core” formats.

Those are:

  • TMX
  • JSON
  • LUA
  • CSV

If you can, always prefer to use those formats! TMX, JSON and LUA all support 100% of the Tiled features. CSV is more limited and basically only contains the tile ids seperated by commas (so it is designed for people who are too lazy to parse more complex formats (or simply do not need all the other information)).

You can check out the TMX format specification or the list of libraries for loading Tiled maps on the documentation pages for seeing how you can make your engine reading those “core” formats.

If you for some reason still want to write your own custom exporter you have two choices:

  1. Write a python plugin for tiled which provides an exporter for your custom format
    In case you want to do this take a look at one of the existing python plugins:
  1. Write a C++ plugin for tiled which provides an exporter for your custom format
    There is no documentation for this either, but you can take a look at the existing plugins for examples:
3 Likes