Six acts in an afternoon

Six acts, 63 zones, 34 biomes and 18 bosses, built by three parallel agents per batch working from a vocabulary-first commit.

A hero fighting the Unmaker among pale pillars and violet crystal shards over a starfield, Act VI
Contents
  1. Vocabulary first
  2. A zone is a row of data
  3. Towns are templates, the wilds are not
  4. A signature per act
  5. Act IV, the tide
  6. Act V, frostbite
  7. Act VI, the Gloam and the arena
  8. The Unmaker plays the whole campaign back
  9. Keeping six acts balanced
  10. What it adds up to
  11. Read next

Act I shipped with the engine in the morning, Acts II–III at 13:20, and Acts IV–VI launched at 14:25 and merged at 15:58. What kept them distinct was ordering and data: vocabulary first, then three agents per batch that never touched each other's files.

Six columns, one per act, listing the town, monster level range, zone counts, three bosses and the signature mechanic of each
The campaign at a glance. Levels run 1 to 75 on Normal; Nightmare and Hell rescale the same zones for the endgame.

Vocabulary first

Every act adds words (biomes, tile kinds, props, monsters) that every layer depends on: generators place a lighthouse, the manifest maps it to a model, the renderer lights it, nav gives it a footprint. So each batch started with a vocabulary-only commit. For Acts IV–VI, 96 lines in shared/constants.ts:

shared/constants.tsTypeScript
export const TileKind = {
  // …
  Lava: 10, // blocks movement, not sight; emits light (Act 3)
  Sand: 11, // walkable desert sand (Act 2) — renders by biome like Floor
  Ice: 12, // walkable ice sheet (Act 5) — renders by biome, glossy
  Abyss: 13, // Act 6 starfield void between floating isles — blocks movement, not sight
} as const
 
export const BIOME_IDS = [
  // …
  // Act 4 — the Hollow Sea (storm coast)
  'town_lanternwatch', // lighthouse harbor town on stilts and docks, storm lanterns
  'storm_coast', // black-sand beaches, sea stacks, tide pools, driftwood, crashing surf
  'shipwreck_shoals', // shallows strewn with wrecks, masts, nets, barnacled rocks
  'kelp_forest', // drowned forest: towering kelp, coral, bioluminescence
  'drowned_cathedral', // flooded gothic cathedral dungeon: pews in water, bells, stained light
  'tide_caves', // bioluminescent sea caves: glowing pools, coral, shells
  // Act 5 — the Frostbound Spires (glacier kingdom)
  // …
  // Act 6 — the Gloam (the void, the finale)
  'town_last_lantern', // a floating monastery isle, a single great lantern
  'shattered_isles', // floating rock islands over a starfield abyss, chain bridges
  // …
] as const

The comments are the brief for all three agents:

  • Worlds (W456): generators and renderer presets, three towns, sea and ice terrain, two dungeon layouts
  • Content (C456): zones, monsters, bosses, quests, items, NPCs, server side of each mechanic
  • Assets (A456): Kenney models, recoloured skins, composite props

Where they met (the tide renderer, say), content wrote a minimal version marked replaceable by worlds.

A zone is a row of data

shared/data/zones.tsTypeScript
{
  id: 'a1_blighted_fields', name: 'The Blighted Fields', act: 1, kind: 'wilderness', biome: 'blight_fields', level: 2, size: { w: 144, h: 144 },
  monsterPool: [
    { monster: 'zombie', weight: 35 }, { monster: 'plague_rat', weight: 20 }, { monster: 'gloom_bat', weight: 10 },
    { monster: 'blightwolf', weight: 15 }, { monster: 'bog_slime', weight: 8 },
  ],
  density: 0.3, waypoint: true, championChance: 0.08, uniqueChance: 0.04,
  questHooks: ['a1_blight_at_the_gate'],
  exits: [
    exit('to_town', 'a1_town', 'to_fields', 'edge', 'To Hollowmere', 'south'),
    exit('to_graveyard', 'a1_hollow_graveyard', 'to_fields', 'edge', 'To the Hollow Graveyard', 'north'),
    exit('to_chapel', 'a1_sunken_chapel_1', 'to_fields', 'stairs_down', 'The Sunken Chapel'),
    exit('to_warren', 'a1_rat_warren', 'to_fields', 'stairs_down', 'The Rat Warren'),
  ],
},

Exits come in named pairs; a data test checks every exit is bidirectional and kinds pair up (stairs down ↔ stairs up). zoneDefToGenInput hands the row to the generators.

Every act follows one pattern:

  • Town: waypoint, stash, healer, smith, quest giver
  • Three or four wildernesses in a loose chain
  • Five to nine dungeons, mostly two or three floors, off the wilds by stairs
  • Three bosses; the act boss's quest grants the next town's waypoint
Act Monster levels
I 1–15
II 16–30
III 31–45
IV 46–55
V 56–65
VI 66–75

Zone level drives monster stats, drop item level and nearby vendor stock.

Towns are templates, the wilds are not

All six towns are hand-authored 64 × 64 templates seeded by zone id alone: two Saltmarrows are identical to the lamp post.

Six towns in a grid: a lantern-lit Hollowmere at night, sandstone Saltmarrow around an oasis, Emberhold ringed by lava, Lanternwatch on docks in the rain, snowbound Whitevigil, and the Last Lantern over a starfield
Hollowmere, Saltmarrow, Emberhold, Lanternwatch, Whitevigil and the Last Lantern. Six templates, each with its own lighting preset.

Mood is mostly lighting. One preset entry per biome sets fog, ambient, hemisphere, moon, player light, exposure, bloom, grade, particles, weather and extras:

src/game/engine/presets.tsTypeScript
frost_wastes: {
  fog: 0xa4b4c6,
  fogDensity: 0.03,
  ambient: { color: 0x8a98b0, intensity: 0.8 },
  hemi: { sky: 0xd8e6f6, ground: 0x505a6c, intensity: 0.75 },
  moon: { color: 0xeef4ff, intensity: 1.4, elevationDeg: 32, azimuthDeg: 250 },
  playerLight: { color: 0xffb070, intensity: 7.5, radius: 9 },
  exposure: 0.9,
  bloom: { strength: 0.4, radius: 0.55, threshold: 0.9 },
  grade: { lift: [0.02, 0.03, 0.06], gain: [0.98, 1.0, 1.05], saturation: 0.72, vignette: 0.5, grain: 0.04 },
  wind: 'wind',
  motes: { color: 0xf4f8ff, count: 170, style: 'sand' },
  weather: { kind: 'blizzard', density: 1, wind: [7.5, 2.4] },
  reflect: 0.25,
  breath: true,
},

Wild variety comes from generator parameters and dressing. Kelp forest and storm coast share the wilderness generator: one floods most ground with shallows and grows coral, the other carves black-sand beaches and sea stacks. The dungeon generator has 13 biomes, each with room names, torch colour, props and boss room name.

A signature per act

Acts I–III differ by place. Acts IV–VI each add a movement rule, server-driven and broadcast as compact state; the client derives the rest from the map.

Act IV, the tide

Phase Duration
Low 40 s
Rising (bell) 6 s
High 22 s
Ebbing 5 s

At high tide, low ground within three tiles of water floods: players wade at 65% speed, aquatic monsters in it deal +35% damage and move +30% faster, and up to four drowned sailors come out of the surf.

The flood mask is a BFS out from water computed by shared floodMask. The schema carries two numbers:

server/game/schema/index.tsTypeScript
/** acts: tide phase index into TIDE_PHASES (shared/data/actMechanics), 255 = no tide in this zone */
tide: t.uint8().default(255),
/** acts: serverTime the current tide phase began */
tideAt: t.uint32().default(0),

Maps wetter than 35% (shoals, kelp forest) only seed the flood from their deepest quarter of water, or they'd drown entirely.

Act V, frostbite

  • Meter 0–100, builds 2.2/s away from warmth (~45 s to full)
  • Thaws 28/s within five tiles of a bonfire, campfire, brazier, fire pit, forge or wall torch
  • Cold resistance slows the build, to half speed at 75
  • 50: −10% speed; 75: −20%; 100: −30% and 0.5% life/s bleed

Crossing the Frost Wastes becomes camp to camp. On the wire it's one uint8 per player; the speed penalty is just the player's speed, which prediction already reads.

A hero caught in a blizzard in the Frost Wastes, snow driving sideways across a pale field
The Frost Wastes. The blizzard is a GPU particle volume that follows the player.

Act VI, the Gloam and the arena

Gloam eyes, the Hollow Saint and the Unmaker can Gloam you: vision closes to 4.5 tiles for a few seconds (an expiry time on the player, a vignette on the client).

The bigger change: the floor moves. The Architect and the Unmaker stamp walls, abyss, flood and warning tiles into named server layers (current pattern, next-pattern warning, bone prisons, collapsing edge, floods), composited by priority straight into the nav grid. Units on a tile that stops being walkable are pushed out; a player the floor drops from under loses 20% life.

shared/data/actMechanics.tsTypeScript
/** `index` (base 36) + code, comma-separated, sorted by index so identical layouts encode identically. */
export function encodeDynTiles(tiles: ReadonlyMap<number, DynTile>): string {
  return [...tiles.entries()]
    .sort((a, b) => a[0] - b[0])
    .map(([i, t]) => `${i.toString(36)}${DYN_CODE[t]}`)
    .join(',')
}

Three or four characters per tile; sorted so an unchanged layout produces no patch. The client stamps the same tiles into its prediction grid, so paths reroute the instant a wall appears. A test checks no arena pattern splits the arena.

The Unmaker plays the whole campaign back

Eight phases. After the opening, each borrows an earlier boss's signature and says so:

A life bar from 100% to 0% split into eight phases: an opening, then the Bone King's prisons, the Sunless King's eclipse, the Ember Lord's meteors, the sea's flood, the Winter Queen's rime floor, the Architect's mirrors, and a final void collapse
The Unmaker's phases as data. Every one reuses a mechanic the player already learned, at a higher speed and damage multiplier.
shared/data/bosses.tsTypeScript
{
  atLifePct: 45, abilities: ['um_erase', 'um_void_bolts', 'um_step'], speedMult: 1.1, dmgMult: 1.15, attackSpeedMult: 1.1,
  yell: 'The sea drained into me once. It can do it again.',
  summonOnEnter: { monster: 'drowned_sailor', count: 3 }, hazard: { ability: 'um_tide', count: 2 },
  specials: [{ kind: 'flood', radius: 20, durationMs: 12000, everyMs: 20000 }],
},
// …
{
  atLifePct: 12, abilities: ['um_erase', 'um_void_bolts', 'um_unmake'], speedMult: 1.35, dmgMult: 1.35, attackSpeedMult: 1.35,
  yell: 'ENOUGH ECHOES. Let there be nothing, and let it be quiet.',
  hazard: { ability: 'um_void_rifts', count: 4 },
  specials: [{ kind: 'void_collapse', fromRadius: 18, toRadius: 7, stepMs: 4000 }],
},
Phase mechanic Reused machinery
Bone prison Architect's wall layer, ringed around a player
Flood the tide's water as an arena layer
Rime floor checkerboard hazard pattern
Mirrors one mirror knight per player, copying their class
Void collapse walkable radius 18 → 7 in 4 s steps

Everything fires through castTriggered, the one path for non-button skills, so a new phase is data, not code. On death: a server-wide announcement, the Lanternbearer title, and an epilogue from Marrow's Echo.

The Unmaker at the Unwritten Throne, in-engine. Void shards fall across an arena that is already losing its edges.

Keeping six acts balanced

Each batch shipped balance tables as tests: a geared hero of the act's level vs its monsters and bosses, asserting hits-to-die, time-to-kill and boss kill times. Acts IV–VI cover levels 50, 60 and 70.

  • Damage stops compounding at 45. Player life is roughly linear; before the cap, level-70 packs two-shot geared heroes.
  • XP steepens past 75: level 99 takes ~1.96 billion.
  • Early taper: fresh characters died too fast in the Blighted Fields, so monster damage ramps from 40% at level 1 to 100% at 16, where Act II starts. A test pins the curve.
  • Nightmare and Hell reuse all 63 zones with per-stat fitted rescaling that keeps each monster's identity. See the endgame.

What it adds up to

Zones 63 (6 towns, 20 wilds, 37 dungeon floors)
Biomes 34
Monster types 109
Bosses 18, with 2–8 phases
Finale titles one per act from Act III

What makes Act V feel different from Act II is mostly a preset entry and a rule about fire. The part I'd reuse: vocabulary in its own commit, three owners in parallel, contracts as data types.