Springs and curves
Learning paths through this topic
Draw a crackling lightning bolt that jumps from enemy to enemy
A straight line between enemies looks like a laser, and random zigzags too wild look like a scribble that flickers into a different shape every frame. Here is a way to build a convincing bolt that has the right amount of jaggedness at every size and holds still until you change it.
Pop loot out of a chest so every item lands on its own spot
Random scatter puts items on top of each other so the player cannot see or click them, and a perfect ring looks fake as soon as there are more items than fit around it. Here is a layout that works for one item or thirty and lets you point it away from walls.
Tune a spring by how far it overshoots and how long it takes to calm down
Spring settings with names like stiffness and damping are hard to feel, and a designer wants to say "overshoot a little and be calm in half a second". Here is how to turn exactly those two wishes into the numbers the spring needs.
Let a chopped tree creak, tip over away from the player and thud on the ground
A tree that rotates at a steady speed looks like a door, and one that always falls the same way looks canned. Here is how the fall starts slowly, speeds up like something heavy, goes away from the one with the axe, bounces a little and then lies still.
Send coins flying from a chest to the purse so the total is always right
A shower of coins looks rewarding, but each coin must carry a share of the reward, a huge reward must not spawn thousands of sprites, and the numbers must add up to the last coin. Here is how to plan the coins, their timing and their curved paths.
Slide waypoint markers along a compass bar and keep them right at north
A strip compass with markers for your camp and the nearest cave is simple until you turn across north, when markers fly across the whole strip or vanish. Here is how to place them, fade them at the edges and pin the important ones.
Make something travel along a curve at an even pace
Something sent along a curve by simply counting from start to end speeds up in the flat stretches and crawls through the tight bends, so a train or a bullet looks wrong. Here is how to ask for a position by distance travelled instead of by progress along the curve.
Frame two characters in a conversation so both stay on screen with room to spare
When the camera moves in on a talk between two characters, a fixed zoom cuts off one of them as soon as they stand far apart, and an automatic one can zoom in absurdly close when they stand together. Here is how to centre and size the view with sensible limits.
Show growing crops smoothly from the planting time, also right after loading a save
Crops that jump a size at each stage and pop all over again every time the world is loaded look cheap. Here is how the size comes from the saved planting time alone, grows smoothly, and the little pop at a new stage plays only when the player actually watches it happen.
Turn four design numbers into an easing curve like the ones in design tools
Designers hand over a curve as four numbers from a drawing tool, but using them for time needs more than plugging them in, since the curve is described sideways. Here is how to read it correctly for any moment, even for steep curves where the usual shortcut fails.
Float damage numbers upward so many hits at once stay readable
One floating number is easy. A flurry of hits on the same enemy lands every number on the same spot and turns into an unreadable smear. Here is how to spread them out, how fast they should rise and fade, and when a new cluster starts.
Flash a red hit vignette that stacks for many small hits but never blacks out
A swarm of weak hits or a shotgun blast can add up to a fully red screen, while a single big hit barely shows. Here is a way to combine hits so many small ones still read as danger, the red never goes past full, and it fades back in a natural way.