to built up your loops:
to accumulate values over time or get changes between frames:
to measure time itself:
nodes that are frame-based implementations of some algorithm:
ADSR (Value Framebased)
Wanderer (Animation 2d)
Wanderer (Animation 3d)
Scenario: an object shall react to events by applying forces.
There are different famous examples of this way of doing animations:
But you also can do your own frame-based animation, simply by patching.
The basic idea here is that the current value of the animation is simply calculated based upon the value of the last frame and tweaked a bit in a certain way. See more about Loops.
When doing this naively, higher frame rates will result in faster animations. To avoid that, here is a simple trick:
- measure how much time has passed between the last frame and the current frame. A combination of Stopwatch (Animation) and FrameDifference (Animation) can help you out.
- scale your velocity and acceleration by this amount
As a result your animation will be framerate independent.