Add stagger map support#405
Conversation
|
Thanks. I won't be able to take a close look for a few days, but just a few thoughts from a quick skim:
|
|
I think user will not fact file not found error because I only use this loader load a tmx. If a tmx use extern png it will load behind. |
| tiled::Orientation::Hexagonal => match tiled_map.map.stagger_axis { | ||
| StaggerAxis::X => match tiled_map.map.stagger_index { | ||
| StaggerIndex::Even => { | ||
| // TODO: Why Even is Odd? |
There was a problem hiding this comment.
I believe this is because of how bevy handles Y coordinates. In tiled map editor Y down goes into the positive and in bevy Y down goes into the negative. When we load the tiles in we end up flipping the entire tilemap along the Y axis using: mapped_y = tiled_map.map.height - 1 - y;. Because of this we also need to "flip" the stagger.
There was a problem hiding this comment.
That makes sense. I'm not sure what to do about that other than add a comment to explain the situation.
Support staggered map.
See #403