Skip to content

FlxTween framerate feature #3367

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

Open
MaybeMaru opened this issue Feb 16, 2025 · 2 comments · May be fixed by #3372
Open

FlxTween framerate feature #3367

MaybeMaru opened this issue Feb 16, 2025 · 2 comments · May be fixed by #3372

Comments

@MaybeMaru
Copy link
Contributor

MaybeMaru commented Feb 16, 2025

I've been working on some projects using FlxTween for in-game animations, but they always update and render at the same frame rate as the game, for example, 60 FPS. This makes them look way too smooth compared to the rest of the animations.

It would be reuseful to have a framerate option for tweens so they can achieve a more cartoony look independent of the game's actual framerate, depending on the developer's preference, perhaps rendering at 24 FPS.

It could work something like this:

var sprite = new FlxSprite();
FlxTween.tween(sprite.scale, {x: 4, y: 4}, 1, {
    framerate: 24
    // As an idea, maybe it could work similarly to FlxG.drawFramerate and FlxG.updateFramerate?
    // drawFramerate: 24
    // updateFramerate: 60
});
@cyn0x8 cyn0x8 linked a pull request Feb 20, 2025 that will close this issue
@TheoDevelops
Copy link

This can be easily done with a custom easing funciton

@Geokureli
Copy link
Member

This can be easily done with a custom easing funciton

Care to share that?

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

Successfully merging a pull request may close this issue.

3 participants