Log inGet started
World

Lamplighter's Round

Branchmain
Branchesmain
Commitea9749977c

README.md

game.dread — the Pale, the HUD, and how fear feels

Slice C of Lamplighter's Round. Three things live here.

1. The Pale

A three-metre hooded figure built from primitives — a hem pooling on the cobbles, a heavy skirt, a hunched shoulder line, a narrow hood, arms too long for the body — with a cold light where a face should be. It carries its own point light, because the fog swallows anything that does not.

It hunts on the vendored vendor.stalker brain, driven by the game's central rule and nothing else:

Lamplight makes you safe but visible. The dark hides you from the Pale and feeds your Dread.

So Core.lightAt(player) is fed straight in as the stalker's visible, hidden, exposure and flashOn senses. Standing under a burning lamp is what lets it see you across the district; standing in the dark is what makes it lose you — and what fills the meter that kills you.

The moment it takes an interest is deliberately unmistakable: the face flares and its light swells, the screen stings red, and the HUD says IT HAS SEEN YOU.

This slice writes Core.state.paleState and Core.state.paleDist and nothing else, and emits paleCaught when the Pale reaches the player.

2. The feel — the dreadveil post pass

One fullscreen effect, registered at priority 240 on the scene layer so it runs after the district's fog, bloom and tonemap and never dims the HUD. Three properties, pushed every frame:

PropertyDriven byWhat it does
dreadCore.state.dreaddrains the colour, cools what is left, and closes the vignette from a wide frame to a keyhole
beata double-thump heartbeat envelope, 52 bpm calm to 138 bpm at full dreadsqueezes the vignette and warms the rim on every thump
stingthe Pale noticing you, decaying at 1.55/sbruises the rim red and flares the frame cold

The bruise is keyed to the screen radius rather than to the vignette, so a closed keyhole reddens its own rim instead of washing the whole frame red.

3. The HUD driver

ui.hud owns every pixel; this module owns the snapshot. It reads Core.state for the meters and the rules slice's own published surface for everything the player is offered:

  • Rules.UPGRADES / upgradeRank / upgradeCost / canBuy / upgradeEffect → the three upgrade rows, including the exact reason a row is dim and the number that rank currently buys
  • Rules.prompt() → the line under the reticle
  • Rules.buyUpgrade(name) → what a click on a row does
  • Rules.restart() → what WALK IT AGAIN does

The slow half of the HUD refreshes at 7 Hz and the focus screen at 18 Hz, rising to every frame while a taper is held or a sting is fading.

Inspecting it

require("game.dread").debug() returns the live hunt reading, the sting and heartbeat envelopes, the veil's registration and whether the HUD is mounted.