Game Design Document · v0.1 · Build target: Claude Code · Engine: three.js + vanilla DOM

Night·Shift

A noir dispatcher game. Calls come in over the wire. You decide who goes where, with what, and what it'll cost.

Category
Strategic puzzle · dispatch sim
Perspective
Top-down isometric · ortho cam
Session
≈ 6-minute shift
Controls
Mouse · WASD optional

01 The pitch

You're a graveyard-shift dispatcher at a small PI agency.

It's always raining. The radio is always alive. Your operatives are good at three things each, and tonight you'll need them all. A clean shift pays well; a bad one brings heat from people you don't want to know.

The fantasy is quiet competence. The player is not the action hero — they're the calm voice on the radio choosing the right hammer for the right nail under time pressure. Every call is a tiny matching puzzle: requirements vs. roster vs. travel time vs. heat. Lose a few in a row and the night starts to spiral.

North-star feeling

The moment a player thinks "I should send Doc and have Pell back her up if Crowe doesn't make it back in time." That's the game. Optimization with personality.

02 Core loop

  1. Call arrives. Radio chatter, beacon pulses on the map, card slides into the queue with a code, location, requirements, and timer.
  2. Read the case. The player skims the skill tags ("STH REQ", "FRC +") against the roster on the right.
  3. Dispatch. Click the call → click a compatible operative. Travel time begins. Operative dot leaves HQ and routes along streets.
  4. On scene. Resolution timer ticks. Skill match determines outcome; expert-level matches earn a clean-resolution bonus.
  5. Return. Operative routes back to HQ. Earnings paid, heat adjusted, log line printed. Repeat for ~30 calls across the shift.
  6. Sunrise. Tally — closed, lost, take. Heat carries; cash unlocks operatives and equipment for the next shift.

03 The roster

Six starting operatives, each with three of five skills at varying levels. Skill ratings are 0 (none), 1 (capable), 2 (skilled), 3 (expert). To clear a case all required skills must be ≥1; ≥2 unlocks a "clean" bonus (+25% pay, –heat). Below 1 means a 35% scrape-by chance — and a burned approach on failure.

W
Maya "Wraith" Okonkwo
FIELD OPERATIVE · CALLSIGN WRAITH
STH · 3TCH · 2 FRC · 1NEG · 1
Ex-Treasury. Goes through doors like she pays rent.
P
Jonas Pell
FIELD OPERATIVE · CALLSIGN PELL
FRC · 3MED · 2 STH · 1NEG · 1
Three combat tours. Field-medic certified.
C
Vivien Crowe
CLOSER · CALLSIGN CROWE
NEG · 3STH · 2 FRC · 1MED · 1
Talked a man off the Mercer ledge in 11 minutes.
S
Otis "Switch" Lange
TECHNICIAN · CALLSIGN SWITCH
TCH · 3STH · 2FRC · 2
Half engineer, half locksmith. Always the half you need.
D
Pearl "Doc" Hannigan
MEDIC / NEGOTIATOR · CALLSIGN DOC
MED · 3NEG · 2 STH · 1TCH · 1
ER nurse for ten years. Knows what people in bad spots need.
R
Reza "Rook" Khouri
FIELD OPERATIVE · CALLSIGN ROOK
FRC · 2NEG · 2 STH · 1TCH · 1MED · 1
Boxer turned process server. Reads a room in five seconds.

Operative states

04 Call catalog

Calls are generated from templates. Each template defines required skills, optional bonus skills, base timer, on-scene resolve time, and payout. Locations rotate from a noir name pool.

CodeTypeREQBONUSTimerResolvePay
10-22Tail SubjectSTHTCH75s11s$120
10-17Bar DisturbanceFRCNEG55s9s$90
10-91Hostage StandoffNEGFRC70s14s$200
10-39WiretapTCHSTH95s13s$150
10-54Welfare CheckMEDNEG80s10s$110
10-66Bag JobTCH · STH110s16s$240
10-32Shake / TipNEGFRC65s10s$130
10-83Witness EscortFRCMED85s12s$170
10-71Cipher PickupTCHSTH90s11s$140
10-12Tail + CaptureSTH · FRC100s15s$260

Urgency

Each call rolls a chance to spawn PRIORITY (urgent). Urgent calls pulse red on the map, fail with 14 heat instead of 8, and tighten timers by 25%. Urgency probability rises through the shift: 18% at 19:00 → 53% at 02:30.

05 Screen layout

Top bar Shift clock · open cases · closed · earnings · city-heat meter · channel ID
Calls panel Stack of incoming cards. Each shows code, type, location, REQ/BONUS chips, urgency, countdown bar. Top of stack is most recent.
▣   THREE.JS CITY VIEW   ▣
isometric ortho · 7×7 block grid
HQ at center · lit windows · neon signs · rain
call beacons pulse on cell · operative dots route streets
Roster panel All operatives. Avatar · codename · role · top skills · live status. Compatible ops glow when a call is selected.
Radio log Time-stamped chatter: dispatch · unit · alert · resolve. Right side: equalizer, channel meter, weather.

Interaction model

06 Numbers & tuning

Travel time

// scene grid units → seconds travelTime(from, to) = 2.5 + manhattanDist(from, to) * 0.9 // HQ at (0, 0). Furthest cell ≈ 6 units away → ~7.9s one way.

Outcome math

function evaluate(op, call) { let miss = false, bonus = 0; for (r of call.req) { if (op.skill[r] < 1) miss = true; if (op.skill[r] >= 2) bonus += 1; } for (b of call.bonus) { if (op.skill[b] >= 1) bonus += 0.5; } if (miss) { // 35% scrape-by per missing requirement chance = Math.pow(0.35, missing.length); ok = Math.random() < chance; } else ok = true; return { ok, bonus }; }

Economy

Heat consequences

07 Progression

The shell is a campaign of seven chapters, each a night with a new wrinkle and a tighter target. Cash carries between shifts and spends on the roster.

Chapter 1
A Quiet Wednesday

Tutorial cases. Three op types. Heat doesn't bite. Target: 6 closures.

Roster: 6Target $850
Chapter 2
The Mercer File

Recurring suspect across three cases. Compound timers — fail one, the rest stiffen.

Resting stateTarget $1,400
Chapter 3
Election Week

Politically-charged calls. PR cost on failure. Negotiators in heavy demand.

Down stateTarget $2,100
Chapter 4
Pier 9

Pier district unlocked. Longer routes, bigger payouts. Two-op calls debut.

Co-dispatchTarget $3,000
Chapter 5
A Wire on the Wire

Internal mole. Two of your ops can't be on the same case. Trust meter introduced.

Trust systemTarget $3,800
Chapter 6
Blackout

Power grid fails twice during the shift. Map goes dark. Tech ops compensate.

Map fogTarget $4,600

Chapter 7 is the long night — no fixed target, just survive until 04:00. Score posts to a personal leaderboard.

Between shifts

08 Art direction

The look: low-poly noir, lit by windows.

A small city block at 2am. Wet streets, sodium-lamp halos, neon signs that pulse on the long beat. Buildings are simple boxes whose only detail is which windows are lit and what color. The mood does the heavy lifting.

Type

Palette

#0A0D12
Midnight bg
#11161E
Panel
#E8E5DD
Ink (cream)
#F4A93D
Sodium amber
#E7376B
Neon magenta
#4CD9E8
Police cyan
#FF3D4A
Alarm red
#6FD49A
Resolve green

3D guidelines

HUD guidelines

09 Audio

Mostly diegetic. The world is dressed by sound, not score.

10 Tech notes for the build

Stack

File map (mirror the prototype)

/index.html // shell — pinned three.js + react + babel /scene.js // three.js world. Exposes NightshiftScene API: // init(host), setCallMarker(id, cell, urgent), // spawnOperative(id, cell, color), // moveOperative(id, cell, durationSec), // flashResolve(cell, success), worldToScreen(...) /game-data.js // ROSTER, CALL_TEMPLATES, evaluateMatch, travelTime /ui.jsx // React HUD + game loop (state machine) /styles.css // noir tokens, panel chrome, type scale /assets/audio/*.mp3 // rain, radio chatter, jazz beds, SFX

Scene → UI contract

The scene owns visuals only. The UI owns time, state, and decisions. Scene exposes pure imperative calls and is otherwise headless. This keeps both halves swappable.

Performance budget

Save schema

{ "chapter": 3, "cash": 4280, "roster": ["wraith", "pell", "crowe", "lange", "hannigan", "khouri", "new-hire-2"], "opXp": { "wraith": { "Stealth": 12 } }, "gear": ["radio-mk2", "favor-pd"], "leaderboard": [{ "night": 3, "score": 14200 }] }

11 Build plan for Claude Code

Stage the build in three milestones so each is verifiable in isolation.

  1. Milestone 1 · Prototype loop (this doc's prototype) Single shift, single chapter, six fixed ops, ten call templates, no save. Confirm the feel.
  2. Milestone 2 · Campaign shell Chapter selection, between-shift store, save/load, full operative XP, six chapters of templates.
  3. Milestone 3 · Narrative + audio Recurring NPCs and the Mercer thread, full audio bed, jazz cues, the long-night chapter and leaderboard.

Out of scope (v1)

12 Known risks