Hey, I need some help.
I’m completely new to Tiled, but it makes my workflow so much more efficient. I’m using my imported tile map to create my level, but the problem I’m coming into involves exporting flipped tiles.
Since I discovered Tiled so late into the development of my game, I’m finding it hard to implement some of the data.
It follows this psuedocode:
Import ‘terrain.csv’ as file for each item in file //need help here var id = item create tile and apply image
This works for all non-rotated tiles, but on some rotated tiles it returns numbers like
I saw on the documentation about tile flipping: TMX Map Format — Tiled 1.7.2 documentation, but my knowledge of CS in general isn’t developed enough to completely understand what I need to implement.
I want to create a procedure that takes the number, and returns a set of booleans and the original ID.
id = 1610612908 def decode(id) //decode and stuff bool horizontal_flip = True/False bool vertical_flip = True/False bool diagonal_flip = True/False id = <decoded id> Return id, horizontal_flip, vertical_flip, diagonal_flip
Any idea if there is a module for this, or where I could start? I found pytmx, but again, I have no starting point to know where to look.