PixJuice

free game assets

Game Feel / Boss HP bar

Boss HP bar — five layers you can stack

Tune a boss health bar live: a delayed white damage bar, hit shake and flash, scale ticks, layered HP colors with a remaining-layer counter, and a low-health alarm with a screen-edge warning — with Godot 4 and web code that follows every slider.

Five layers, stack them yourself

1 · Delayed white bar

Damage does not leave the bar instantly: the lost chunk stays white for a moment, then catches up. The player reads how big the hit was from the gap.

The wait-then-catch rhythm is long-standing boss-bar practice; the 0.35 s wait / 0.45 s catch values are tunable defaults, not measured standards.

Pitfall A ghost that never catches up lies to the player. Restart the hold on rapid hits if you like, but the chase must always finish.

2 · Hit shake & flash

The bar itself reacts: a short decaying shake and a brief white flash on every hit, a touch harder when a layer breaks.

Shake that decays within a fraction of a second follows the screenshake practice on the hit-feel page (Nijman 2013; Song 2005); 0.27 s / 14 px / 0.08 s here are tunable defaults.

Pitfall Shaking the whole HUD makes the interface feel broken. Shake the bar, not the screen — and skip the shake entirely under reduced motion.

3 · Scale ticks

Fine lines every 10% give the eye a ruler for how far the boss has fallen; small triangle markers at 25 / 50 / 75 flag the phases ahead.

Quarter marks usually match phase changes rather than any published rule — the 10% step and the quarter markers are tunable defaults.

Pitfall Ticks every 5% turn the bar into a ruler you read instead of a bar you feel. Keep them quiet.

4 · Layered HP

The boss carries several health layers: the bar drains purple, then orange, then red, and a ×N counter shows how many layers are left. Breaking a layer is its own event.

Color order and the ×N badge are genre convention (fighting-game boss bars), not a measured finding — tunable defaults. Keep the count small; three reads, seven doesn't.

Pitfall If the layer break has no reaction of its own (flash, sound), players read it as a bug — the bar jumped, not the fight.

5 · Low-health alarm

Under the threshold the bar pulses red with a glow, and — if you want it — the edge of the screen warns red. In this demo the edge stays inside the demo stage, never the whole page.

The 25% threshold and 2.5 Hz pulse are tunable defaults. A pulse fast enough to feel urgent is also fast enough to annoy — offer reduced motion.

Pitfall A full-screen red vignette that ignores the player's reduced-motion setting is a motion-sickness trap. Respect prefers-reduced-motion from day one.

✦ Reduced motion

Not a juice layer: an accessibility switch for the whole demo. Auto follows the OS preference; On replaces every pulse and shake with a steady state that carries the same information.

Engine code

The Godot tab exports a Control script with the whole recipe; the web tab is one self-contained HTML file (CSS + JS) you can open as-is. Both rebuild from what the demo is playing — the Exporting line says whose numbers they carry.

Exporting: my tune

Hookup & limits
  • Targets Godot 4.x (a Control script — the header comment lists the node tree to build: Track, LagFill, Fill, Ticks, labels, optional edge vignette) and any browser for the web tab (one self-contained HTML file).
  • Hookup: feed damage through take_damage(units) / heal(units); setup(fraction) starts a fight. The low-HP threshold compares against the boss's total HP across all layers, not the active layer.
  • Every number is a tunable default exported from the lab — retune it for your project; it is a starting point, not a rule.
  • The screen-edge warning belongs in your HUD layer, never on the window root; the exported snippets honor prefers-reduced-motion / the reduce_motion flag on their own.

Code snippets are CC0. The knight GLB is provided for in-page playback.

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.

  • Every timing on this page (0.35 s lag, 0.27 s shake, 2.5 Hz pulse…) is a tunable default from action-game practice — no published standard exists for boss bars.
  • The toggle-and-compare method comes from Jonasson & Purho, “Juice It or Lose It” (2012). Demo ↗
  • Short, fast-decaying shake over constant jitter: Nijman, “The Art of Screenshake” (2013); Song (2005).
  • Kao (2020) — moderate juice beats none and extreme; the restrained preset is the same lesson applied to a HUD. DOI ↗
  • Reduced-motion practice: WAI content on animation from interactions, prefers-reduced-motion. WCAG 2.2 ↗

Questions & answers

Do these numbers come from research?

No. Every timing here is a tunable default — a starting point from action-game practice, not a published standard. The sources section lists what is actually published (mostly the toggle-and-compare method and shake practice).

Does the screen really turn red?

Only inside the demo stage. The low-health edge warning is scoped to the bar's container on purpose, so the page around it never flashes. In your own game, put it in the HUD layer it belongs to.

What about accessibility?

The reduced-motion switch (auto follows the OS) replaces pulses and shakes with steady states that carry the same information, and the exported web snippet honors prefers-reduced-motion by itself.