Axel Exporter Plugin for Mappy

I've recently been toying around with the Axel Game Library ( I'm really liking the library so far as it is based on Flixel, but also utilizes hardware rendering. This means you get better performance and is especially nice for mobile devices.

One of the key components of the library is the AxTilemap class which has a slightly different implementation than the Flixel tilemap class. Creating tilemaps through code is a pain. For serious development, most people utilize a tile editor program. One popular choice is Mappy. Mappy supports plugins via lua scripts for exporting tilemaps to various formats. I took the liberty of modifying the Flixel exporter so that it outputs maps that are easily compatible with Axel. You can grab the plugin below.

Axgl Exporter

Just download the file, unzip it and place the Export AXGL map.lua file into mappy's luascr directory.

You will have to update the MAPWIN.INI file to include this plugin. Open the file in your text editor of choice and find the lua scripts section. You should see several lines of text such as this:


All you have to do is add one more line like this:

lua16=Export AXGL map.lua.

Note that in the example above I used lua16, but you should replace 16 with whatever number comes next in your ini file.

Now after creating your tilemap, you can select Custom > Export AXGL map from the program menu as shown below. This will prompt you for a file name/location and export the data.

To use the data just embed the exported text file and pass an instance to the function.

// embedding the data
[Embed(source = "path/to/map/map1.txt", mimeType = "application/octet-stream")]
public static const MAP_DATA:Class;

// using the data
var myMap:AxTilemap;
myMap = new AxTilemap().build(new MAP_DATA, YOUR_TILE_SET, 64, 64, 6);
Bookmark and Share

Leave a Reply

Subscribe to RSS feed FGS5 Badge