Tiled2Map is a handy tool designed to simplify the conversion of JSON files generated by the Tiled map editor.
Tiled is a 2D map maker software commonly used in game development. It exports maps in JSON format, where all the data is listed sequentially.
Tiled2Map was created to convert these JSON files provided by Tiled into JSON files structured in a more understable format, where map data is organized as [columns][rows]
or [x][y]
. It also automatically handles multiple dynamic layers, unless they are empty.
Tiled2Map is really easy to use :
$ Tiled2Map.exe ./input.json ./output.json
For instance, a single layer map with 2x2 dimensions would be exported by Tiled as a single list of 4 (=2²) elements, like so : "data": [125, 56, 128, 126]
and will be converted to "data": [[125, 56], [128, 126]]
by Tiled2Map.
This tool is written in Go and is freely available for public use. Whether for personal or commercial projects. It is under the GNU GPLv3 License.
Contributions to Tiled2Map are welcome! Feel free to open an issue or submit a pull request on GitHub to suggest improvements or report bugs.