Punch and impact
Learning paths through this topic
A trap or pressure plate that fires twice, or not at all, when the hero dashes over it
Triggers checked once per frame against the tile the hero stands on fire again and again while it stands there, and miss a plate entirely when a dash or a lag spike jumps from one side to the other. Here is how to list exactly which tiles a move crossed so each is entered once.
Footsteps and leg animation slide when the hero walks slowly or at different speeds
If steps are driven by a clock, a slow walk looks like skating and a sprint sounds like one long rattle. The feet should land when the body has really travelled far enough, even when a lag spike swallows several in one frame. Here is what to count and where to start.
A hero drawn in four directions flickers when you walk diagonally
When the pictures only exist for up, down, left and right, a diagonal walk has to pick one. A naive pick flips back and forth with every tiny wobble of the stick, and the hero looks nervous. Here is the rule that keeps the look calm without making turns feel late.
Walk, run and stand from a stick that flickers between the thresholds
Analog sticks let a hero tiptoe, walk or run, and the animation has to pick one. With a single threshold per gait, a thumb resting near the line makes the legs switch every few frames. Here is how to use two thresholds per change so the gait holds, and how speed still follows the stick inside each gait.
Walking tile by tile that stays smooth when you keep a key held or tap it
Step-by-step movement often stops for a heartbeat on every tile, or swallows a quick tap that came a little too early. Both make the hero feel like it is wading through mud. Here is how to carry the time over between tiles and how long an early tap should be remembered.
On an ice floor the hero must keep sliding until something stops it
Slippery floors make a good puzzle, but only if the rules are exact: where the slide begins, where it ends, whether it can go on forever, and what happens on the last tile. Here is a small rule set that makes every slide predictable and returns the whole route for the animation.
Pressing "talk" picks the wrong person when two things stand close together
A shop counter, a chest and a villager can all be within reach at once. Picking the nearest looks right until the highlight starts flickering between two while you walk. Here is how to rank what you are facing, and how to make the choice stay put unless something is clearly better.
In an angled-view map the hero walks twice as far going up as going sideways
With a tilted diamond-shaped map, pressing a direction on screen and moving the same number of pixels is not the same as walking the same distance on the ground. Enemies, ranges and timers all drift out of balance. Here is which space the speed belongs in and how to convert both ways.
Climbing a ladder with hands that match the rungs and a clean way off at the top
Ladders in adventure games go wrong in small ways: the hero slides past rungs without grabbing them, flies off the top, falls off the bottom by accident, or coasts after the stick is released. Here is how to treat the climb as a position along the ladder, with events for rungs and both ends.
Switching the locked-on enemy with a flick of the stick jumps wildly or fires repeatedly
With several enemies around, players want to move the lock from one to the next by flicking the right stick. Done carelessly, it picks something on the other side of the screen, or it keeps switching as long as the stick is held. Here is how to choose the next one and when to allow another flick.
Dropped coins that fly to the hero without orbiting, tunnelling or arriving at once
A pull toward the player makes collecting loot pleasant, but a bad one makes coins circle the hero, shoot past, or leap into the pocket the moment they drop so the reward is never seen. Here is a short delay, an acceleration that builds up and a step that can never overshoot.
A long list that is slow to scroll with a held key, or races past the item you wanted
Inventories and spell lists can have hundreds of rows. Moving once per press is tedious, a fixed fast repeat overshoots, and wrapping around while holding sends you back to the start. Here is a held-key rhythm with a pause first, a speed-up later and a different rule at the ends.