Spielerando

Punch and impact

Learning paths through this topic

Blinking while invulnerable looks different on every screen

Toggling the character every frame looks like a gentle flicker on one screen and a solid ghost on another, and sometimes it ends while the character is invisible. Here is how to tie the blink to time, make the end always visible, and add a first-moment flash.

Damage numbers that stay readable when a fast attack hits ten times

Every hit spawning its own floating number turns a fast weapon into an unreadable pile. Merging the numbers helps, but a number that keeps merging never floats away, and a critical hit gets lost in the sum. Here is a design that stays clear.

A dodge with safe frames, where only a well-timed one earns a reward

If the whole dodge is safe, everything counts as a perfect dodge and the reward means nothing. If the safe time is too short, the dodge feels broken. Here is how to split the dodge into safe and perfect parts, and stop one attack from paying twice.

A fast attack or bullet flies right through a small enemy without hitting

Checking where the weapon is at each frame misses everything it passes between two frames. The faster the attack, the more hits vanish, and it depends on the computer. Here is the check that finds the first point of contact along the whole path.

Screen flashes in the game that stay within what sensitive players can bear

Hits, explosions and lightning that flash the screen can be harmful to some players when they come in quick succession. A small gate that counts recent flashes makes this safe to ship and costs the look almost nothing. Here is the count, the window and a softer option.

Freeze only the two characters in a hit while the rest of the world moves

Stopping the whole game at every hit is wrong in a crowd: ten enemies, a boss and bullets all stutter because of one blow. Giving the pause to just the two characters keeps the fight alive. Here is how and what the frozen target should do meanwhile.

The character feels slippery or sluggish, and the stick moves it when untouched

Tuning acceleration numbers by feel gives results nobody can compare, and analog sticks that rest slightly off centre make the character creep. Describing the feel in seconds and cutting the stick's resting noise gives control that behaves the same on every pad.

A short freeze on impact that gives hits weight but never locks the game

A tiny freeze when a hit lands makes it feel heavy. Built carelessly it never ends, doubles when hits come close together, or ruins the timing of everything else. Here is how long it should last, how several are combined, and how the freeze itself is counted.

Hit and footstep sounds that do not become a repeating machine-gun

Playing the same sound again and again quickly feels fake, and picking at random often plays the same sample twice in a row. Many hits in a moment also add up to a deafening wall. Here is a fair way to choose, vary the pitch and limit the stacking.

A burst of sparks on a hit that goes the right way and grows with the damage

Random sparks in every direction look like noise, sparks that all fly the same way look like a hose, and a fixed number is dull for both a poke and a finisher. Here is how to aim a cone, space the pieces evenly and scale the count without overloading a slow phone.

A button, enemy or sign that wobbles and settles after being hit

A wobble driven by trial and error runs differently at every frame rate, explodes with big steps, or never fully stops. A spring with friction that is calculated exactly behaves the same everywhere. Here is the calculation and the values that look like rubber, wood or jelly.

Knockback that pushes the right way, a controlled distance, without errors

Getting hit should push the character away from the attacker. Unlucky overlaps produce a push in no direction, or one that flings a heavy enemy as far as a light one. Here is how to pick the direction safely and how to set the distance instead of a speed.