Feedback & Juice
Every player action needs a response the player can see, hear or feel, immediately. That is feedback. When it is exaggerated and layered (a hit that flashes, shakes the screen, spits particles, plays a crunchy sound and pauses for two frames) designers call it juice. Juice doesn't change the rules at all, yet it can be the difference between a game that feels dead and one that feels great.
Same game, with and without juice
The demo below is one tiny game: click the target. Toggle Juice and compare. The rules are identical; only the feedback changes.
<label style="font:14px sans-serif"><input type="checkbox" id="juice" checked> Juice</label>
<canvas id="c" width="320" height="200" style="display:block;background:#1e1b4b;margin-top:6px;cursor:crosshair"></canvas>
<script>
const canvas = document.getElementById("c"), ctx = canvas.getContext("2d");
const juice = document.getElementById("juice");
let target = { x: 160, y: 100, r: 22 }, score = 0, shake = 0, squash = 0, flash = 0, seed = 1;
let particles = [], popups = [];
const rand = () => (seed = (seed * 16807) % 2147483647) / 2147483647; // small seeded RNG
canvas.addEventListener("click", (e) => {
const r = canvas.getBoundingClientRect();
const x = (e.clientX - r.left) * canvas.width / r.width, y = (e.clientY - r.top) * canvas.height / r.height;
if (Math.hypot(x - target.x, y - target.y) > target.r) return;
score++;
if (juice.checked) {
shake = 8; squash = 1; flash = 1;
for (let i = 0; i < 14; i++) {
const a = rand() * Math.PI * 2, s = 60 + rand() * 120;
particles.push({ x: target.x, y: target.y, vx: Math.cos(a) * s, vy: Math.sin(a) * s, life: 0.5 });
}
popups.push({ x: target.x, y: target.y, life: 0.8 });
}
target = { x: 30 + rand() * 260, y: 30 + rand() * 140, r: 22 };
});
let last = 0;
function frame(now) {
const dt = last ? Math.min((now - last) / 1000, 0.1) : 0; last = now;
shake = Math.max(0, shake - 40 * dt); squash = Math.max(0, squash - 4 * dt); flash = Math.max(0, flash - 5 * dt);
particles = particles.filter((p) => (p.life -= dt) > 0);
popups = popups.filter((p) => (p.life -= dt) > 0);
for (const p of particles) { p.x += p.vx * dt; p.y += p.vy * dt; p.vy += 300 * dt; }
ctx.save();
ctx.fillStyle = "#1e1b4b";
ctx.fillRect(0, 0, canvas.width, canvas.height);
if (flash > 0) { ctx.fillStyle = `rgba(255,255,255,${flash * 0.25})`; ctx.fillRect(0, 0, canvas.width, canvas.height); }
ctx.translate((Math.random() - 0.5) * shake, (Math.random() - 0.5) * shake); // visual only, so true randomness is fine
const sx = 1 + squash * 0.4, sy = 1 - squash * 0.3;
ctx.fillStyle = "#facc15";
ctx.beginPath(); ctx.ellipse(target.x, target.y, target.r * sx, target.r * sy, 0, 0, Math.PI * 2); ctx.fill();
ctx.fillStyle = "#f472b6";
for (const p of particles) ctx.fillRect(p.x - 2, p.y - 2, 4, 4);
ctx.fillStyle = "#fff"; ctx.font = "bold 16px sans-serif";
for (const p of popups) { ctx.globalAlpha = p.life / 0.8; ctx.fillText("+1", p.x - 8, p.y - 30 * (0.8 - p.life) - 26); }
ctx.globalAlpha = 1;
ctx.restore();
ctx.fillStyle = "#fff"; ctx.font = "14px monospace"; ctx.fillText(`score ${score}`, 8, 18);
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
</script>The feedback toolbox
| Technique | What it does | Typical numbers |
|---|---|---|
| Screen shake | the camera jolts on impact | a few pixels, decaying over 0.1–0.3 s |
| Hit-stop | freeze for a few frames on a big hit | 2–6 frames (see Pausing & Time Scale) |
| Flash | the hit object turns white for a frame | 1–3 frames |
| Squash and stretch | objects deform when they land, jump or get hit | 10–40% |
| Particles | sparks, dust, debris | short-lived, many |
| Easing / tweens | UI and objects accelerate and settle instead of moving linearly | 0.15–0.4 s for UI |
| Sound | the single biggest feel improvement per minute of work | layered, slightly randomized pitch |
| Number pop-ups | damage numbers, "+1" | float up and fade |
| Controller rumble | haptic feedback on hits and explosions | short pulses |
Easing: motion with character
Linear motion looks mechanical. Easing functions map time (0 to 1) to progress (0 to 1) along a curve. A menu that slides in with "ease out" starts fast and settles gently; a button that "overshoots" feels springy. Here are three common curves sampled at five points:
const ease = {
linear: (t) => t,
easeOutQuad: (t) => 1 - (1 - t) * (1 - t),
easeOutBack: (t) => { const c = 1.70158; return 1 + (c + 1) * (t - 1) ** 3 + c * (t - 1) ** 2; },
};
for (const [name, f] of Object.entries(ease)) {
const samples = [0, 0.25, 0.5, 0.75, 1].map((t) => f(t).toFixed(2).padStart(5));
console.log(`${name.padEnd(12)} ${samples.join(" ")}`);
}linear 0.00 0.25 0.50 0.75 1.00
easeOutQuad 0.00 0.44 0.75 0.94 1.00
easeOutBack 0.00 0.82 1.09 1.06 1.00
easeOutBack goes past 1 (up to about 110%) before settling: that overshoot is what makes a popping UI element feel alive. Engines ship tweening tools for this: Unity has DOTween (a popular Asset Store package) and Animation curves, Godot has the built-in Tween class, Unreal has Timelines and curve assets.
Screen shake done right
A popular approach is to keep a trauma value from 0 to 1. Hits add trauma, it decays over time, and the shake amount is trauma squared, so small hits barely shake and big ones really do. Decay must use delta time so the shake lasts the same time at any frame rate:
let trauma = 0;
const decayPerSecond = 1.5, maxOffsetPx = 12, dt = 1 / 60;
const events = { 0: 0.3, 20: 0.6 }; // frame -> trauma added (a small hit, then a big one)
for (let frame = 0; frame <= 50; frame++) {
if (events[frame]) trauma = Math.min(1, trauma + events[frame]);
const shake = maxOffsetPx * trauma * trauma;
if (frame % 5 === 0) console.log(`frame ${String(frame).padStart(2)}: trauma ${trauma.toFixed(2)} shake ±${shake.toFixed(1)} px`);
trauma = Math.max(0, trauma - decayPerSecond * dt);
}frame 0: trauma 0.30 shake ±1.1 px
frame 5: trauma 0.17 shake ±0.4 px
frame 10: trauma 0.05 shake ±0.0 px
frame 15: trauma 0.00 shake ±0.0 px
frame 20: trauma 0.60 shake ±4.3 px
frame 25: trauma 0.47 shake ±2.7 px
frame 30: trauma 0.35 shake ±1.5 px
frame 35: trauma 0.22 shake ±0.6 px
frame 40: trauma 0.10 shake ±0.1 px
frame 45: trauma 0.00 shake ±0.0 px
frame 50: trauma 0.00 shake ±0.0 px
Don't overdo it
- Accessibility. Strong screen shake and flashing can cause discomfort or motion sickness, and rapid flashing can trigger seizures in photosensitive players. Offer a setting to reduce or disable shake and flashes.
- Readability first. Juice must never hide information: a particle cloud that hides the next enemy is a bug.
- Scale with importance. If every action shakes the screen, nothing feels big. Save the strongest effects for the most important moments.
Test yourself
What does 'juice' change in a game?
- The rules and difficulty
- The feedback: how actions look, sound and feel
- The frame rate
- The save format
Why is shake often computed from trauma squared?
- It is faster
- Small hits barely shake and big hits shake a lot, which reads better
- It prevents negative values
- Engines require it
Which accessibility option should a game with heavy screen shake offer?
- None needed
- A setting to reduce or disable shake and flashing
- A higher frame rate
- Louder sound