I am relatively new to MonoGame and C#. I just can’t seem to figure out how to render the map (.tmx) file, using either TiledSharp or tmx-mapper-pcl. I sort of know what I need to do, but I would need that tiny bit code which shows what to do after the map file has been loaded (var map = new TmxMap(“someMap.tmx”);). I would also need to make it work with Farseer Physics Engine and I have no idea how to go about that. I’m trying to make a 2D side scroller, so I think its not that hard, but I could be wrong.
I have been googling for hours, with different search terms, but I can’t find anything that would work with either one of those two libs.
If there are other ways/libs to render a map made with Tiled, do tell.
Thanks in advance,
Temeez, Windows 7, MonoGame 3.3.
Did you get it to build into the new content pipeline tool that they put in? If you did, then how? Also, which did you use, TiledSharp or tmx-mapper-pcl?
Oh, forgot to mention, I used TiledSharp and I didn’t compile the .tmx file at all. I just put the file to the project and set it to “copy if newer” and then Level.Map = new TmxMap(“Content/Levels/map.tmx”);
For row you are dividing the the tileset height like so _tileset.Height / _tileHeight, and if im understanding you correctly they are the same thing. Was it meant to be something else? Also, did this work for multiple layers for you? When i implemented it, only 1 tile was being drawn as the entire map.
I haven’t got the time to test if it works with multiple rows, but I took that logic from somewhere here http://rbwhitaker.wikidot.com/ (I think, it has been a while)