Revision of Tiled Map Editor tmx to scnx Glue integration toolkit from Thu, 02/16/2012 - 00:13

Tagged:

This is a tool that is designed to integrate directly into the Glue tool which will let you specify Tiled Map Editor files (.tmx) with the "Add Externally Built File" option.

Build your map with Tiled Map Editor: http://www.mapeditor.org/

Simply place the exe somewhere useful to you, and in Glue do the following:

Update your glue to the daily build. Following the instructions outlined here:
http://www.flatredball.com/frb/docs/index.php?title=Glue:Reference:Menu:...

1. Click the settings menu, and choose File Build Tools
2. Click "Add new build tool"
3. In the primary arguments:
a. Build Tool: Path to the exe
b. SourceFileType: tmx
c. DestinationFileType: scnx
In the list on the left, you should see: *.tmx -> TmxToScnx.exe -> *.scnx
4. Click ok.

The tool is now integrated into Glue. In order to use it, follow these steps:
1. In any scene, right click on "files"
2. Select Add Externally Built File
3. Select the .tmx file

Glue will automatically run the tmx file through the build tool, and generate a .scnx file in your Glue project. All changes to the .tmx file will now automatically trigger updates to the .scnx file as long as Glue is open.

For fun, try having GlueView open to the scene while you update the tmx file using Tiled Map Editor. GlueView should automatically render the new changes.

You can grab the source code for this tool here:
https://github.com/kainazzzo/TiledMap-FlatRedBall-Conversion
In either repository or zip form.

IMPORTANT NOTES:
You may find it necessary to add this line to your Game's Initialization to avoid black lines:
FlatRedBallServices.GraphicsOptions.TextureFilter = TextureFilter.Point;

You must use zlib or gzip compression (tiled map editor defaults to zlib) to use this tool. Base64 encoding (no compression) also works, but straight XML will not. This is a setting in Tiled Map Editor preferences, and if you haven't changed it, chances are that it will work just fine for you.

Product File: 
Syndicate content