How animation time relates to process delta

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sudo_apt-get
:warning: Old Version Published before Godot 3 was released.

I may have a hard time wording this question…

Is the number of frames in an animation determined by the target frame rate of a project,or by the actual achieved frame rate on running.

(For those wondering, the difference in practice is that calling a frame every target frame rate will cause the animations to look like they are in slow motion when the actual frame rate slows down. And look like they are on speed when frame rates are above target.

Calling a frame every actual rate causes animations to become choppy at low frame rates.)

And does the _on_process signal fire based on the same metric as an animation frame? Or can they become offset so that multiple on_process steps happen between frames?

I think what’s happening is that ideally, delta matches the framerate. But if there is a slowdown, delta will increase and frames may eventually be skipped, because delta is there for that reason: framerate is not always constant, we live in the real world after all^^
But delta has also a maximum value it’s capped to, because the game would just not work properly above it.
You can maybe test if frame skip happens by artificially freezing the game (by using breakpoints or OS-specific stuff so the window hangs) so delta reaches maximum value, and see if that causes the animation to jump.

Zylann | 2017-02-02 11:56