Animation and sprites
How Animation Loop Timing works
Estimate a constant-frame-rate animation cycle, playback duration and frame presentations for repeated loops.
Choose the cycle convention
Forward mode presents each of the N frames once. Ping-pong mode presents the forward sequence followed by the reverse interior frames, so the endpoints are not duplicated within or between cycles. For N≥2, it uses 2N−2 presentations; a single-frame cycle uses one.
Convert frame rate to time
Each frame lasts 1/FPS seconds. Multiply by presentations per cycle, then multiply by the chosen number of complete cycles. The reported duration includes the display interval of the final frame.
Match your animation system
Some engines hold endpoint frames, use per-frame durations or schedule transitions differently. This model assumes a constant playback rate and no inter-loop pause. It does not export animation assets or account for variable frame rate.
Worked example
A 12-frame ping-pong animation that does not duplicate the endpoints contains 22 frame presentations per cycle. At 12 FPS, a cycle takes about 1.8333 seconds and three cycles take 5.5 seconds.
Try the calculatorAbout the method
This tool uses the stated arithmetic and assumptions. Test the worked example and confirm the inputs before using the result.