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

Fixes incorrect rendering of flipped animation tiles #846

Merged
merged 5 commits into from
May 18, 2024

Conversation

tigurx
Copy link
Contributor

@tigurx tigurx commented Apr 28, 2024

This PR fixes the incorrect rendering of flipped tiles that are animated.

The reason this bug occurred was that when the vertex buffer got updated with the next animation frame texture, it pulled the default orientation instead of the flipped version.

I opted to add a dictionary of the flipped vectors to the animation frames. This dictionary only gets loaded with the necessary orientations of flipped vectors needed for rendering. I thought this was a better option than recalculating all of the necessary flipping in the update loop. This adds a bit more memory overhead, but should run faster.

Feel free to reach out if you have any questions. I have some footage of the before and after I can show if you are interested.

@AristurtleDev AristurtleDev self-assigned this May 17, 2024
@AristurtleDev AristurtleDev self-requested a review May 17, 2024 19:27
@AristurtleDev AristurtleDev merged commit 9c5f7cd into craftworkgames:develop May 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants