Cross-platform Tiled map parsing utilities.
TiledLib - Core library, everything you need to read Tiled maps/tilesets.
TiledLib.Pipeline - MonoGame content pipeline extension, provides a ContentImporter for Tiled maps.
If you add a ContentProcessor, you will be able to map the output of the supplied importer to custom classes tailored specifically for your game.
using(varstream=File.OpenRead(filename)){varmap=Map.FromStream(stream, ts =>File.OpenRead(Path.Combine(Path.GetDirectoryName(filename),ts.Source)));foreach(varlayerinmap.Layers.OfType<TileLayer>()){for(inty=0,i=0;y<layer.Height;y++)for(intx=0;x<layer.Width;x++,i++){vargid=layer.data[i];if(gid==0)continue;vartileset=map.Tilesets.Single(ts =>gid>=ts.FirstGid&&ts.FirstGid+ts.TileCount>gid);vartile=tileset[gid];// Do stuff with the tile.}}}