I’m working with unity, trying to import an existing tileset in my random generated map.
I have parsed and reverse engineered tsx file for getting correct sprites depending on terrain type, but at the moment I’m stuck on interpreting comma separated values in the “terrain” xml attribute…like this:
<tile id=“144” terrain="5,5, , "/>
Pretty sure that’s needed for tiles transitions: i.e. tile “144” should be used when terrain “5” is found in 2 of 4 corners around the actual tile.
The point is that i can’t fully understand the logic.
Sometimes it seems that those 4 digits start from upper right counter clock wise, but every now and then the logic is completely the opposite…
Anyone else solved this tricky logic ?