Skip to content
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

Decouple Layer#tile_at from render order #29

Merged
merged 1 commit into from
May 4, 2023

Conversation

vinnydiehl
Copy link
Contributor

@vinnydiehl vinnydiehl commented May 3, 2023

Thinking more on it, it doesn't make sense to use the render order here; that's not what it's for. I for one can't imagine a scenario where a user would prefer to use an Y-axis opposite the one that the game engine uses, but if it should be supported, it should be as a separate option. WDYT?

@vinnydiehl
Copy link
Contributor Author

vinnydiehl commented May 4, 2023

I suppose people might artificially flip their Y-axis on the DragonRuby side if it's something that they're used to, now that I think of it. When I get home I'll add a keyword argument to make it optional.

@wildfiler
Copy link
Owner

I checked coordinates in Tiled, they always (0,0) at the top left corner and are not changed when 'render order' is changed. So I think this method should not use render order because it can be confusing. Users always can transform coordinates on their side if it is needed.

@vinnydiehl
Copy link
Contributor Author

Yeah render order wasn't the move here. da5fdfb reverted in the last force push.

Copy link
Owner

@wildfiler wildfiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Nice catch!

@wildfiler wildfiler merged commit d99f7f8 into wildfiler:master May 4, 2023
@vinnydiehl
Copy link
Contributor Author

vinnydiehl commented May 4, 2023

There's an open PR mapeditor/tiled#2040 for this exact pain point, I might try to hack it to completion some time. Seems the option is implemented but objects are still anchoring in the upper left.

@vinnydiehl
Copy link
Contributor Author

vinnydiehl commented May 4, 2023

Got the 5-year-old changes merged from that PR, I have a working up-to-date build on my fork if you're interested ;) https://github.com/vinnydiehl/tiled/tree/invert-y

@vinnydiehl vinnydiehl deleted the tile-at branch June 4, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants