Spielerando

Springs and curves

Learning paths through this topic

Make a homing spell curve toward its target without orbiting it forever

A spell that can only turn so fast looks natural as it bends toward an enemy, but if the enemy is too close or off to the side it circles forever and never hits. Here is how to turn the short way, notice the doomed case, and end it cleanly.

Slide the hotbar highlight to the chosen slot, also across the wraparound

Scrolling past the last quick slot should land on the first one, but a naive glide rushes backwards across the whole bar. Here is how the highlight takes the short way, keeps its momentum when you scroll again mid-move, and still ends on the right slot.

Let a dropped inventory item fly to the slot it was thrown toward

Players let go of an item while their hand is still moving, and the nearest slot to the cursor is often not the one they meant. Here is how to read the flick, pick a sensible free slot, send the item back when nothing fits, and avoid wild jumps across the bag.

Knock a creature back by exactly the distance you chose, at any frame rate

A shove that multiplies the speed by a number each frame throws the creature twice as far on a slow computer, and a hit against a wall can leave it stuck in it. Here is how to choose how far and how long it slides and have both come out right every time.

Let a lantern on a pole lag behind when the hero starts, and swing forward when they stop

A lantern, flag or bag carried by the hero should not be glued upright. It should hang back when they set off and swing on when they stop. The trick is in what makes it move: not the hero's speed, but how that speed changes. Here is the formula, with the sign that is easy to get wrong.

Let a lift or drawbridge change its destination mid-move without a jerk

Press the button for another floor while the platform is moving, and most movers either keep going to the old stop or jump to a new speed at once. Here is a way to turn around or continue toward the new stop smoothly from wherever the platform is, at whatever speed.

Spin a prize wheel that slows down and stops on the prize already rolled

The prize should be decided honestly first, and the wheel then has to look as if it simply ran out of speed there. Players notice if it stops on an edge, jerks at the end or turns backwards. This shows how to work out the exact stopping angle and how to give a click for every wedge.

Zoom a world map so zooming in and out feel equally fast

Zooming in on a big map often feels like it races at the start, while zooming back out crawls, and the spot under the cursor drifts away. Here is the one change that makes both directions match and keeps the place you pointed at where it was.

Scale a weapon swing with attack speed so the hit moment still lines up

A faster attack speed that simply plays the swing quicker makes the blow unreadable, and the damage often lands at the wrong point of the arm's motion. Here is how the three phases shrink at different rates, where the hit happens, and how long you must wait before the next swing.

Roll a mine cart along a track that speeds up downhill and stalls uphill

A cart at a fixed speed feels like a ride at a fair. A cart that follows the hills feels like part of the mine: fast on the way down, slowing up the next rise, sometimes running back. Here is how to do that on any shape of track, including the moment it finally rests.

Show other players moving smoothly although the server reports only ten times a second

In a shared world, other people's positions arrive in bursts, and drawing them as soon as they come makes everyone stutter and teleport. Here is how to show them slightly in the past so motion is smooth, how long to guess when messages are late, and when to simply jump.

Scroll layered backgrounds at different speeds without pixel shimmer or seams

Distant hills that move slower than nearby trees give depth, but in pixel art the layers shimmer, blur or wobble against each other, and tiling layers show a gap when the camera goes left. Here is how to place every layer so it stays crisp and repeats without a seam.