Autotile in xTile

Oct 20, 2011 at 3:14 PM

I've been wondering for the longest time about whether it's possible to perform the autotile function outside of tIDE. Is there an autotile implementation in the xTile library for use in, say, random map generation?

Oct 20, 2011 at 3:42 PM

The autotile definition data are stored as Tilesheet custom properties so you just need to parse them out. However, the autotiling logic is implemented in the editor code, so you might want to look at editor's autotiling code and adapt it for your purposes. More specifically, browse into the tIDE project within the TileMapEditor solution, then go into the Autotiles namespace folder and look at AutoTile.cs and AutoTileManager.cs.  This code contains both the custom property parsing logic and autotile placement logic. I have also written an article on codeplex to explain the implementation.