Animation frames

Godot Version

4.0

Question

if within an animation some frames are the same to others should I draw them anyway rather than left empty space?? for instance, looking at the png file about the jumping animation, the row in the bottom…

I am using a Sprite2D to implement a state machine solution for managing animations..

use separate animations frame or hard coded the frames in each animation.

It may seems like some lagging experiences if you draw empty frames.

mm, I did not completely understand what you mean…

You don’t need to draw filling frames. If you plan to use Sprite2D, you can measure frame duration by using Timer or Delta. Easiest solution would be to use AnimatedSprite2D which allows you to set individual frame duration and overall fps. Or AnimationPlayer, for full control of your sprite animation with visual timeline.

for what I understood, I set JUMP animation without filling with empty frames but just planning the animation duration(2 seconds) in the following manner:

can it be the right way?

For AnimationPlayer just put keyframes when you want to change sprite. Play around, it’s intuitive enough.
I still recommend to check out AnimatedSprite2D, it’s much less functional, but may be just enough for your project.
Also check this: 2D sprite animation — Godot Engine (stable) documentation in English

I am not going to use AnimatedSprite2D rather than AnimationPlayer because I plan to define a State Machine to implement a 2D Platformer Character