Game Feel / Game Feel Sandbox

Game Feel Sandbox — tune a hit, then copy the code

Six juice layers on one 2D hit — hit stop, screen shake, hit flash, knockback, squash and sparks. Drag a slider and the demo answers; switch to Godot, Unity or Phaser and the snippet rebuilds with your numbers; share the recipe as a link.

Sandbox parameters

1 · Hit stop

Freeze the whole simulation for a few dozen milliseconds at the moment of impact. Nothing moves — and that pause is the weight.

Hit stop (ms)70 ms

How long the simulation freezes on impact. Light hits 30–60, heavy hits 100–200.

Published anchors: action games freeze “a few frames” (Song 2005); Guilty Gear Xrd ≈7 frames light / ≈10 heavy (Lin et al. 2022); Smash Ultimate ≈15 frames at 15 % damage, 30-frame cap (SmashWiki). At 60 fps, 7 frames ≈ 117 ms.

Pitfall Past about 250 ms the freeze reads as a dropped frame, not as weight.

2 · Screen shake

Offset the camera by smooth sines under an exponential envelope. Amplitude is the peak offset in pixels, decay how fast it fades.

Shake amplitude (px)6 px

Peak camera offset. A few pixels is plenty on a small stage.

Shake decay (/s)9 /s

Higher numbers fade the shake sooner — aim for gone within half a second.

Shake frequency (Hz)34 Hz

Low rumbles for heavy blows, high buzz for light ones.

Directional, short and fast with a quick decay — practice from Nijman (2013) and Song (2005). Amplitudes have no published standard: tunable defaults.

Pitfall The shake runs on the real clock, so it keeps breathing through the hit stop. Fresh random jitter every frame reads as a glitch.

3 · Hit flash

The victim turns into a solid silhouette for N real frames. Counted outside the freeze, so the flash is visible during the hit stop.

Flash length (frames)2 f

Real frames of solid color on the victim. Counted outside the freeze.

A 1–2 frame flash follows the Jonasson & Purho demo (2012). Frames, not milliseconds: the count survives any frame rate.

Pitfall A flash longer than about six frames blurs into a color error instead of a blink.

4 · Knockback

Launch the victim along the hit direction with one impulse, then damp the velocity exponentially until it stops dead.

Knockback force (px/s)240 px/s

Launch speed along the hit direction. Scale it with damage.

Knockback damping (/s)7 /s

Velocity kept decays as e^(−damping·t). Travel distance is force ÷ damping.

Direction follows the attack line (Song 2005; Nijman 2013). No published distance table — the travel is force ÷ damping, so start from the presets.

Pitfall Low damping makes a long uniform slide — that reads as weightless. Fast out, sudden stop.

5 · Squash & stretch

The victim compresses along the blow and widens across it, then springs back past its resting shape once before it settles.

Squash amount0.3

0..1 — how far the victim compresses before it springs back.

Squash and stretch is the first of Disney's twelve animation principles (Thomas & Johnston 1981); the amount is a tunable default.

Pitfall Scale the visual only — never the collision body — and keep the feet planted, or the character appears to jump.

6 · Directional sparks

A burst that travels with the force, into and through the target. The cone follows the hit direction.

Spark count18

Particles per hit, in a cone along the hit direction.

Particles and hit light appear in the Juice It or Lose It demo and Song (2005); counts have no standard — pair the burst with a PixelArtVFX impact effect below.

Pitfall An isotropic burst at the impact point reads as confetti. Aim the cone along the hit.

Engine code

These snippets rebuild from the sliders above, so the numbers you see are the numbers they carry. Paste them straight into your project.

Exporting: Crisp

Hookup & limits
  • Targets Godot 4.x GDScript, Unity 2021.2+ C# and Phaser 3.60+ JavaScript. Hit stop sets the engine's time scale to 0; the restore timer, the shake and the flash counter run on real time, so the freeze can always end.
  • Call impact(direction, hit_point) (Godot, Phaser) or Impact(direction, hitPoint) (Unity) from your own hit detection. Each snippet's header lists the nodes it expects.
  • The squash scales the visual node only, never the collision body. Unity's true white flash needs the included HitFlash.shader (Built-in Render Pipeline); without it the sprite is tinted instead. Phaser uses setTintFill.
  • Every number is a tunable default exported from the sandbox — a starting point to retune, not a rule. Units are pixels and milliseconds at the demo's scale.

Code snippets are CC0 — reuse them without attribution.

How to tune a hit that feels good

Game feel is the difference between a hit that lands and a hit that lands softly. When players swing and connect, they read the weight of the blow from six cues that arrive within a fifth of a second: a short freeze, a shake of the camera, a flash of white on the target, the target flying backwards, its body squashing on impact, and a burst of sparks. Remove any one of them and the hit gets quieter. Stack them carelessly and the screen turns into noise. The sandbox above lets you dial each cue separately on a live 2D demo, compare three presets, and copy the result into Godot, Unity or Phaser.

Hit stop: the pause is the weight

Hit stop freezes everything at the moment of contact — animation, physics, particles — for a few dozen milliseconds. Nothing in the game actually changes during the freeze; it simply gives the player's eye time to register the impact before the world moves on. Light attacks usually take 30 to 60 milliseconds, heavy attacks 100 to 200. Past a quarter of a second the freeze stops reading as weight and starts reading as a dropped frame.

Screen shake: small, fast, short

A good shake is a few pixels at a high frequency, decaying within a quarter of a second. Run it on the real clock rather than the game clock, or it freezes along with everything else during the hit stop and is never seen. Shake biased along the attack line reads as a push; pure random jitter reads as a glitch.

Hit flash: the cheapest signal

One to three frames of solid white — or a hot color such as yellow or red — on the struck target is the clearest single signal that damage happened, and it costs nothing to draw. Keep it short and count it in real frames so it stays visible through the hit stop. Longer flashes blur into a color error.

Knockback: fast out, sudden stop

Launch the target fast along the hit direction and damp the velocity quickly so it stops dead; a slow constant slide reads as weightless. In fighting games the launch scales with damage, and heavy hits carry the target much further than light ones. A wall nearby is free juice — let the target hit it.

Squash and stretch

Compress the target along the axis of the blow and widen it across it, then let it spring back past its resting shape once before it settles. Ten to thirty percent is enough for a human character; slimes, blobs and cartoon enemies can take far more.

Sparks: travel with the force

Particles that travel with the force, into and through the target, tell the eye where the energy went; an isotropic burst reads as confetti. Pair the feel with a ready-made pixel impact from the PixelArtVFX library — Critical hit, Blunt hit, Hit spark or Impact frame — so the burst and the behavior agree.

Tune by comparison, not by numbers

Settle on a preset, trigger it next to the page default, and move one slider at a time until the hit reads the way you want. Every value on this page is a tunable starting point from common action-game practice, not a published standard — the ranges below show where to begin, not where to end.

Common starting ranges

The three presets side by side, with the range each value usually sits in. Numbers are tunable defaults from action-game practice; retune for your game.

Parameter starting ranges per preset
Parameter Subtle Crisp Heavy Common range
Hit stop (ms) 4070160 Light 30–60 · heavy 100–200
Shake amplitude (px) 3614 2–4 light · 8–16 heavy
Shake decay (/s) 1495 5–20 · gone within 0.5 s
Shake frequency (Hz) 443422 20–60 · low for heavy, high for light
Hit flash 1 frame · white 2 frames · white 5 frames · yellow 1–3 frames · 6 at the most
Knockback force (px/s) 110240520 Scale with damage
Knockback damping (/s) 1274.5 5–15 · stop within 0.5 s
Squash amount 0.150.300.60 0.1–0.3 humans · up to 0.7 blobs
Spark count 81840 6–40 · cone along the hit

Frames to milliseconds at 60 fps

Hit stop and flash length in frames and milliseconds
1234691218
17 ms33 ms50 ms67 ms100 ms150 ms200 ms300 ms

Engines count hit stop and flash in frames; the sandbox takes milliseconds and frames so both habits work. At 30 fps the same frame counts last twice as long.

Sources & method

Slider numbers are tunable defaults — starting points to retune for your project, not universal rules. Published sources are cited separately below; unlabeled numbers come from action-game practice (the industry's oral tradition), not research. Retune for your game.

  • Song, “Improving the Combat ‘Impact’ of Action Games” (2005) — frame freezing, directional camera shift, hit light, layered audio. Article ↗
  • Sakurai, Famitsu vol. 490–491 — hitstop scales with damage; both sides freeze equally. Translation ↗
  • SmashWiki, “Hitlag” — per-game formulas: Ultimate ≈15 frames at 15% damage, 30-frame cap. Wiki ↗
  • Lin et al. (2022) — Guilty Gear Xrd ≈7 light / ≈10 heavy frames; hit stop, sound consistency and camera control are the critical three. arXiv ↗
  • Jonasson & Purho, “Juice It or Lose It” (2012) — flash, squash, particles, the toggle-and-compare method. Demo ↗
  • Nijman, “The Art of Screenshake” (2013) — directional, fast-decaying shake; knockback as a layer.
  • Thomas & Johnston, The Illusion of Life (1981) — squash and stretch as the first principle of animation.
  • Kao (2020) — moderate juiciness beats none and extreme. DOI ↗

Questions & answers

What is game feel, and why does a hit need it?

Game feel is how a game responds to the player's input — whether an action reads as instant, heavy, soft or floaty. A hit that lands without a freeze, a shake, a flash or a reaction looks the same as a hit that missed. The sandbox isolates each cue so you can see what every one of them adds.

How long should hit stop be?

Light attacks usually freeze for 30 to 60 milliseconds and heavy attacks for 100 to 200. Published anchors point the same way: Guilty Gear Xrd uses about 7 frames for light and 10 for heavy hits (Lin et al. 2022), and Smash Ultimate about 15 frames at 15 % damage. Past roughly 250 ms the pause reads as a dropped frame.

Does the screen shake run during hit stop?

Yes, on purpose. The shake decays on the real clock while the world is frozen, so the camera keeps moving through the freeze and the impact never looks static. The flash counts real frames for the same reason; the knockback, squash and sparks wait for the freeze to end.

Which engines can I paste the code into?

Godot 4.x (GDScript), Unity 2021.2 or newer (C#) and Phaser 3.60 or newer (JavaScript). Each snippet carries the exact numbers on your sliders, lists the nodes it expects in its header, and uses the engine's time scale for the freeze so physics, tweens and animations stop together.

Are the parameter values from research?

No. Every value is a tunable default from common action-game practice — a starting point, not a published standard. The published sources behind the method (Song 2005, Sakurai's Famitsu columns, Lin et al. 2022, Jonasson & Purho's Juice It or Lose It) are listed in the sources section.

Can I share a tune with my team?

Yes. Copy recipe link puts the whole tune — every switch and slider — into the page URL. Open the link and the sandbox restores those exact values, in any of the five languages.

Is the sandbox free, and does it upload anything?

It is free and runs entirely in your browser; nothing is uploaded. The code snippets are CC0, so you can use them in commercial games without attribution.