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

Enhance Tweening #353

Open
4 tasks
nightm4re94 opened this issue Nov 8, 2020 · 3 comments
Open
4 tasks

Enhance Tweening #353

nightm4re94 opened this issue Nov 8, 2020 · 3 comments

Comments

@nightm4re94
Copy link
Member

nightm4re94 commented Nov 8, 2020

What feature / which classes are you referring to?
The Tweening framework

Describe what could be enhanced.

  • Loopable Tweens
  • Start / Stop Tween Events
  • Unit Tests
  • Camera Zooming and panning using Tweens
@Hades948
Copy link
Contributor

I've noticed that when the frame rate is lower than max, tweens are taking longer to complete. For example, if I specify a duration of 3 seconds, my max FPS is set to 60, and the game is running at 40 fps, it's taking closer to 5 seconds to complete the tween. Not sure if that's the intended behavior for running at a lower frame rate or not. But if it is, it would be very nice to provide a callback that executes when the tween has actually completed. That way I can string tweens together and start one exactly when the one before it ends.

@nightm4re94
Copy link
Member Author

nightm4re94 commented Dec 23, 2022

This is indeed more of an inconsistency with documentation rather than a bug. Tween durations (like most durations in the engine) are given in ticks, not milliseconds.
We should adjust the Docs to be more clear about that.
To chain Tweens, you could use Game.loop().perform(), by the way. (but still, callbacks are a future requirement)

@Hades948
Copy link
Contributor

Oh, wow. I've been using Timer.schedule. I replaced all of those calls with Game.loop().perform() and that fixed multiple problems, haha. Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants