-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stagger map support #405
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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