I’m using code from the demo, it works properly on a tilemap with a single layer. But as soon as I add a second layer, it stops working. I’m creating .tmx and .tsx files with Tiled 1.0.2.
This is what it looks like using Monogame Extended code from the demo.
This is the map in Tiled.
The tiledmap file looks like this
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.0.2" orientation="orthogonal" renderorder="right-down" width="5" height="5" tilewidth="32" tileheight="32" nextobjectid="1">
<tileset firstgid="1" source="Trees.tsx"/>
<tileset firstgid="81" source="Dirt.tsx"/>
<layer name="Tile Layer 2" width="5" height="5">
<data encoding="csv">
81,81,81,81,81,
81,81,81,81,81,
81,81,81,81,81,
81,81,81,81,81,
81,81,81,81,81
</data>
</layer>
<layer name="Tile Layer 1" width="5" height="5">
<data encoding="csv">
69,0,0,0,69,
69,69,69,69,69,
69,69,69,69,69,
69,69,69,69,69,
69,69,69,69,69
</data>
</layer>
</map>
I have a much much more complicated tilemap with animated tiles that I would love to get working in Monogame. That map fails in similar fashion to this one.