Using the TiledToOrx Converter

Source code for the converter can be found here: https://gitlab.com/sausagejohnson/tiledtoorx

1. Get a copy of Tiled Map Editor here http://www.mapeditor.org/

2. Get the latest version of the TiledToOrx Config Converter Tool: TiledToOrx Download or use the Online Version.

3. Get your tiles image and check what your tile dimension is. I'm using a few tiles from Mushroom Stew and these are each 32 x 32 pixels:

4. Run Tiled. The following program will load:

5. Make sure orthogonal is set, your map size, and the width & height of the tiles.

6. Select Map > New Tileset

7. Give the name as “Tiles” (without quotes). This will be used for naming the config graphics entries automatically later on.

8. Browse to your tile set image.

9. Ensure the tiles dimensions are correct (32×32 in this case). Leave the rest default and click OK.

10. Save your .tmx file with File > Save As

11. Load the converter tool. It will look something like this:

12. Start by browsing to your .tmx file.

13. The lower pane will always show the current converted output.

14. From this point on, the converter will watch the original TMX file for changes. Any further work in Tiled will be automatically updated in the converter output pane.

15. Click “Copy to Clipboard” to copy the entire contents to the clipboard. To copy part of the output, select the range with the mouse, then click the button. You can then paste the content into your Orx config file(s).

Hopefully you should get something like the following:

[TilesGraphic]
Texture		= Tiles_grass_set.png
Pivot		= top left
TextureSize		= (32, 32, 0)
 
[Tiles1@TilesGraphic]
TextureOrigin		= (0, 0, 0)
 
[Tiles2@TilesGraphic]
TextureOrigin		= (32, 0, 0)
 
[Tiles3@TilesGraphic]
TextureOrigin		= (64, 0, 0)
 
[Tiles4@TilesGraphic]
TextureOrigin		= (96, 0, 0)
 
[Tiles5@TilesGraphic]
TextureOrigin		= (128, 0, 0)
 
[Tiles6@TilesGraphic]
TextureOrigin		= (0, 32, 0)
 
[Tiles7@TilesGraphic]
TextureOrigin		= (32, 32, 0)
 
[Tiles8@TilesGraphic]
TextureOrigin		= (64, 32, 0)
 
[Tiles9@TilesGraphic]
TextureOrigin		= (96, 32, 0)
 
[Tiles10@TilesGraphic]
TextureOrigin		= (128, 32, 0)
 
[Tiles11@TilesGraphic]
TextureOrigin		= (0, 64, 0)
 
[Tiles12@TilesGraphic]
TextureOrigin		= (32, 64, 0)
 
[Tiles13@TilesGraphic]
TextureOrigin		= (64, 64, 0)
 
[Tiles14@TilesGraphic]
TextureOrigin		= (96, 64, 0)
 
[Tiles15@TilesGraphic]
TextureOrigin		= (128, 64, 0)
 
[TilesMap]
Map		= Tiles1 #Tiles1 #Tiles12 (etc etc)

Now that you have a map, you can use it in a game using a routine something like this.