Timing and easing
Learning paths through this topic
Make a smooth chase look the same on slow and fast screens
A camera or health bar that eases toward its goal feels quick on one computer and sluggish on another. Here is why the usual one-line smoothing depends on the screen speed, and what to use instead so every player sees the same motion.
Build a cast bar that damage can slow down a little, or break when it is heavy
A cast time that nothing can disturb is no risk, and one that any scratch cancels is no fun. Here is a cast bar where light hits push the bar back a limited number of times, heavy hits break it, and the finish lands in the right frame.
Let sprinting drain stamina, stop at zero exactly and resume only after some rest
A sprint bar that blocks at zero but allows sprinting again the next frame makes players stutter in and out of a run, and one that stops a frame late overspends. Here is the timing that stops exactly when the bar is empty and asks for a little rest before the next sprint.
Play a frame-by-frame animation where some frames last longer
Anticipation and impact frames need to be held longer than the rest, but a fixed number of frames per second flattens that. Here is how to pick the right picture for any moment, and what should happen at the end for one-shot, looping and back-and-forth animations.
Trigger sounds and effects at exact moments, even when a frame is slow
Footsteps, sword swooshes and fireworks tied to moments in an animation either get skipped when the game hiccups or play twice. Here is how to make every marker go off exactly once, in order, including in animations that repeat.
Time a row of spike traps so there is always a safe way through
A corridor of traps that all fire together is a coin flip, and one that fires at random can be impossible. Here is how to give each trap a warning and a delay in the row, and how to check in advance that a running player can get through.
Rotate to a new direction the short way instead of spinning around
A turret or character told to face 10 degrees when it faces 350 degrees often swings the whole way round. Here is how to pick the shorter turn every time, how to turn at a limited speed without overshooting, and what to do when the target is exactly behind.
Let a move end exactly on its goal and pass spare time to the next one
Chained moves often stop a hair short, overshoot on a slow frame, or lose a little time at every join so a sequence drifts out of sync with the music. Here is how to make each step land cleanly and hand over what it did not use.
Blend walking and running by speed so the feet do not slide or hop
Mixing a slow walk and a fast run for in-between speeds looks wrong when the two cycles have different lengths: the legs fall out of step and the character seems to skate. Here is the way to mix them so every foot lands together.
Stop wall-jump climbing by briefly overriding steering, then hand control back smoothly
Spamming the wall-jump towards the same wall can climb forever, and cutting steering completely feels like a trap. Here is a short override of steering that blends back to full control, so the jump leaves the wall but the player still feels in charge.