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

Fix some ranged attack animation bugs #587

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

NQNStudios
Copy link
Collaborator

I need to keep testing this.

Fix #582
Fix #97

@NQNStudios
Copy link
Collaborator Author

Recentering on the target after the missile goes off the edge seems to work... but there are some cases where recentering before the animation starts, on a tile between the origin and the destination, could make it so the whole animation fits on the screen. I think that should be the first choice behavior.

@NQNStudios NQNStudios force-pushed the fix-ranged-anim branch 2 times, most recently from 54ea300 to 4db6a11 Compare February 10, 2025 20:34
@NQNStudios
Copy link
Collaborator Author

NQNStudios commented Feb 14, 2025

I'm ready to recommend merging this. There is one more bug I want to fix in ranged animations but it already existed without my changes, eludes fixing after many attempts to debug, and I don't want to let the fixes in this branch go stale because I can't figure that one out at the moment.

This video shows the current master branch running combat with a variety of ranged animations at Slow game speed:

https://youtu.be/I6P-Gy1JARk

It demonstrates #97, #582, and #602 (the bug I mentioned I haven't fixed yet.)

This video shows my updated animation code running the replay of the same combat sequence:

https://youtu.be/XeL1KjWEMhY

You can see #97 and #582 fixed.

There's also behavioral changes in how the view is framed:

old new
When player missile anims start, the missile flies from off-screen if the current camera view doesn't show the active PC When a player missile animation starts, the camera always moves to show the player's attack/cast animation and the origin of the missile
When enemy missiles fly off-screen, the camera stays in the same place so you often don't see where the missile lands. For both player and enemy missile attacks, the camera will pan to a location which better showcases the missile's destination before it lands and the boom happens. This pan happens halfway through the missile's flight, OR when the missile being tracked goes off-screen.
When a PC fires multiple missiles, the camera stays where it was when you select the last target. You might not see the majority of your missiles land. When a PC fires multiple missiles, the game calculates a frame that shows the highest amount of targets and their booms. A missile heading toward the desired frame is tracked, and the pan will happen early if this missile goes out of frame earlier than halfway through the animation duration. (Now, it could be argued that it should always track and show the destination of the last missile that's targeted, but even so, I think it should aim to show as much carnage as it can.)

(Sorry the quality of the videos is terrible.)

@NQNStudios NQNStudios marked this pull request as ready for review February 14, 2025 20:06
@NQNStudios
Copy link
Collaborator Author

I can't currently stage the replay for you to conveniently run it yourself because of the problem with test scenarios mentioned in #601. However, here is the Ranged Arena scenario compressed:

ranged-arena.zip

@NQNStudios NQNStudios changed the title Fix ranged attack animations Fix some ranged attack animation bugs Feb 14, 2025
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.

spell blast was drawn off-screen Graphical bug when missile trajectory exceeds current view.
2 participants