Closed JacksonHoggard closed 4 years ago
Edit: thanks @tinovasq for laying the framework for tilemapping! Currently working on creating and combining the layers to be displayed.
<map version="1.0" orientation="orthogonal" width="20" height="20" tilewidth="32" tileheight="32"> <tileset firstgid="1" name="grass-tiles-2-small" tilewidth="32" tileheight="32"> <image source="grass-tiles-2-small.png" width="384" height="192"/> </tileset> <tileset firstgid="73" name="tree2-final" tilewidth="32" tileheight="32"> <image source="tree2-final.png" width="256" height="256"/> </tileset> <layer name="Background" width="20" height="20"> <data> <tile gid="13"/> <tile gid="2"/> <tile gid="1"/> ... </data> </layer> <layer name="Top" width="20" height="20"> <data> <tile gid="0"/> ... </data> </layer> <objectgroup name="Collision" width="20" height="20"> <object x="287" y="354" width="127" height="60"/> </objectgroup> </map>
Helpful link for reading TMX files!
Good luck! Hopefully my stuff doesn’t break on you! Let me know if you need anything poked at while you work on this.
Thanks! The code you wrote has worked well so far, haven't had any problems.
Add tile mapping into the engine
Edit: thanks @tinovasq for laying the framework for tilemapping! Currently working on creating and combining the layers to be displayed.
Example:
TMX file
In the Engine: