---------------
: What is it? :
---------------

Tiled to Torque X is a program to convert .tmx files created using the Tiled Map Editor (http://www.mapeditor.org/) into Torque X tile layer scene objects.  Tiled to Torque X is written in C# using Visual C# 2010.


--------
: Why? :
--------

When I started designing a side-view platformer game using tile maps, I discovered that Torque X Builder had atrocious tile editing capabilities.  It was slow, cumbersome, and lacked many basic features.  To work around it, I started building my levels in the Tiled Map Editor.  Tiled to Torque X was created as a way to generate Torque X tile layer scene objects from a Tiled .tmx file.  The program generates XML scene objects that need to be manually added to the .txscene file.


---------------------
: How does it work? :
---------------------

( Adding a tileset. )

When you add your tilesets into Tiled, you must name them after the tileset's material name inside the Torque X Builder.  For example, I have a tileset named forest.png.  I created a new material inside Torque X Builder for my tileset and name it forestMaterial.  When I add the tileset to Tiled, I must name it forestMaterial.

( Configuring the resulting Torque X scene object. )

By default, Tiled to Torque X creates Torque X tile layers with a tile size of 5 units.  In order to change this, you must add a special Map Property.  It can be accessed by clicking the Map menu item and choosing Map Properties.  To change the size of the tiles, add the properties tile_size_x and/or tile_size_y.

( Determining the order of the layers. )

Tiled to Torque X follows Tiled's layer ordering.  When converting to XML code for Torque X, the top-most layer in Tiled is assigned to layer 0 in Torque X.  The next layer will be assigned layer 1, after that layer 2, and so on.  Don't use more layers than Torque X can handle.  Tiled to Torque X will not check for invalid layers.  Torque X can handle up to 31 layers.  If you check the "Count layers up from 31" option, Tiled To Torque X will generate tile maps starting from the layer 31 (the bottom layer) and counting up to 0.


--------------------------------
: What works and what doesn't? :
--------------------------------

Tiled to Torque X was designed to read .tmx files created by Tiled version 0.4.0.  It does not support the CSV tile data option added in version 0.4.1.  It does not support Object Layers.