Visual feedback that makes actions readable and satisfying. Screen flashes, damage flashes and hurt vignettes, floating damage numbers, hit sparks and impact frames, screen shake and hit-stop, trails and afterimages, telegraph warnings (danger zones, charge-ups, outlines), pickup and level-up bursts, transitions (fade, wipe, iris, pixelate), slow motion, and the rules that keep effects readable...
Download skill (.zip) Files on GitHubGame visual effects
Toolbox: game-feel-engineering feel.js (shake, hit-stop, tweens, flash), particle-effects particles.js, shader-development
shaders.js (flash, dissolve, chroma, hurt, desaturate, pixelate).
Effect menu
| Moment | Effects (in order of payoff) |
|---|---|
| Hit an enemy | White sprite flash (60–100 ms) · spark burst toward the hit direction · tiny shake · damage number · knockback |
| Kill / big hit | + hit-stop (60–100 ms) · bigger burst · chroma pulse or 1-frame impact frame · drops pop out |
| Player hurt | Red vignette (hurt shader or a red edge gradient) · blink during i-frames · shake · health bar drain animation |
| Pickup | Scale pop (outBack) · sparkle · number floats up · HUD counter bumps |
| Charge / danger | Telegraph: growing outline or ground circle, color shift to red, a rising sound, before the attack lands |
| Level up / win | Flash to white then fade · confetti · slow motion for 0.5 s · banner text tween |
| Death | Desaturate (desaturate shader) · slow motion · dissolve the sprite |
| Scene change | Fade (150–300 ms) · wipe · iris · pixelate transition |
Recipes
// Floating damage numbers (pooled; crits bigger and yellow)
popups.spawn((p) => Object.assign(p, { x, y, vy: -60, life: 0.7, text: String(dmg), size: crit ? 22 : 14, color: crit ? "#ffd84d" : "#fff" }));
popups.update((p) => { p.y += p.vy * dt; p.vy += 120 * dt; return (p.life -= dt) > 0; });
// draw: globalAlpha = min(1, p.life * 3); strokeText + fillText (outlined, readable on any background)
// Afterimage trail for dashes: store the last 5 positions, draw them with alpha 0.4 → 0.05
// Screen flash: full-screen white rect, alpha 0.6 → 0 over 120 ms (tween), drawn over the world, under the HUD
// Iris transition: ctx.beginPath(); ctx.rect(0,0,W,H); ctx.arc(px, py, r, 0, Math.PI*2, true); ctx.fill() (r tweened)
Readability rules
- Gameplay first: effects never hide bullets, enemies or the player. Enemy bullets get the highest contrast.
- Scale with importance: frequent events get tiny effects; rare ones get everything.
- Short: most effects < 0.3 s. Long effects only in calm moments.
- Consistent language: the same color means the same thing everywhere (red = danger, yellow = crit / reward).
- Accessibility: a “reduce flashing / shake” setting and
prefers-reduced-motion; no flashes faster than 3 per second; don’t rely on color alone (add shapes or icons). - Performance: pool everything, cap particles, half-resolution post effects on phones.
Check
Record a short clip (render_preview) of a busy moment and look at single frames: can you still see the player and every
threat? Then compare with effects off and decide what to cut.