Since my DBP importer didn't get much attention in program announcements, I thought I'd post my AppGameKit version here. Took about the past 6 hours to write. Demo attached complete with all source code for the library.
All 3 map types are supported: Orthogonal, isometric rotated, and isometric staggered.
Hold the left mouse button down to move the map around. Keys 1-4 will load different maps, with the zelda map taking the longest to load.
I did some loading tests between my AppGameKit and DBP versions. I like AppGameKit! The load time for the large zelda overworld map was almost 10x faster! But that's probably mostly due to the different xml parser I made for it.
DBP - AGK
-------------------
1. 285 - 50
2. 125 - 28
3. 50 - 21
4. 26825 - 2961
The commands work using a tile index to reference locations on the map. If you want grid coordinates, the following equation will work regardless of map type.
tileIndex = tmx_GetTileIndex(1, getRawMouseX(), getRawMouseY())
tileY = floor((tileIndex-1) / TMX_Map.mapWidth)
tileX = (tileIndex-1) - tileY * TMX_Map.mapWidth
Commands:
tmx_LoadMap(string filename)
tmx_FreeMap()
tmx_DrawGridTile(int tileIndex, int red, int green, int blue)
tmx_SetMapPosition(int x, int y)
tmx_SetMapVisible(boolean)
int = tmx_GetTileIndex(int layer, int worldX, int worldY)
Unlike the DBP version, this one doesn't store the collision boxes from the map file but can be easily added.
"You're all wrong. You're all idiots." ~Fluffy Rabbit