Go to file
jing af9f1ad66d Multiplayer: shared-booth relay + client sync + avatars
- server/relay.mjs: WebSocket room (ws, 127.0.0.1:8433 behind a proxy).
  Relays positions/edits/repairs/platter states; keeps the authoritative
  world diff + quest state for late joiners; persists to booth-state.json.
  Hardened: origin allowlist, 24-peer cap, 2KB frames, 40 msg/s budget,
  bounds+type validation on every message, ping/terminate dead sockets.
- src/net/NetClient.ts: offline-tolerant client — mirrors bus events out,
  applies remote events with an echo guard (quest.repair/platter setters
  are idempotent/deduped so replication can't loop). 10Hz delta'd positions.
- src/net/Avatars.ts: voxel-person avatars with headphones + name tags,
  lerped to network updates.
- Menu: DJ name setting (auto-generated default); help page multiplayer note.
- main.ts: wires avatars + status chip ('online - N other DJs in the booth').

Verified with two live tabs: mutual avatars, block edit + quest repair
replicate both ways, late-joiner gets full state replay, non-gameplay
setBlock correctly does NOT sync, zero console errors, relay log clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 23:06:49 +10:00
.claude TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
docs Concept-art pass: terraced records, spindle towers, warm lit room 2026-07-13 21:48:00 +10:00
server Multiplayer: shared-booth relay + client sync + avatars 2026-07-13 23:06:49 +10:00
src Multiplayer: shared-booth relay + client sync + avatars 2026-07-13 23:06:49 +10:00
.gitignore Multiplayer: shared-booth relay + client sync + avatars 2026-07-13 23:06:49 +10:00
demo-audio.html TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
demo-engine.html TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
demo-machines.html TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
demo-player.html TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
demo-worldgen.html TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
index.html TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
package-lock.json TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
package.json TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
README.md TURNCRAFT: contracts, docs, and all five lane deliverables (pre-integration) 2026-07-13 20:50:56 +10:00
tsconfig.json Multiplayer: shared-booth relay + client sync + avatars 2026-07-13 23:06:49 +10:00

TURNCRAFT

Honey I Shrunk the DJ. A Minecraft-style voxel game where the entire world is a vinyl DJ booth — two Technics-style 1200s, a 4-channel mixer, cable canyons, a patch-bay dungeon, and circuit-board caves — and you're 7 mm tall, riding the records.

Building it with parallel agent lanes

Five independent lanes, disjoint file ownership, shared contracts already written in src/core/ (read-only for all lanes).

lane brief delivers
A docs/briefs/LANE_A_ENGINE.md voxel storage, greedy mesher, procedural texture atlas, renderer
B docs/briefs/LANE_B_PLAYER.md FPS controller, voxel collision, ride-the-record platform physics
C docs/briefs/LANE_C_WORLDGEN.md the whole booth, built parametrically in voxels
D docs/briefs/LANE_D_MACHINES.md spinning platters, tonearm, faders, break/place, the quest
E docs/briefs/LANE_E_AUDIO_FX.md synthesized house groove in stems, beat-reactive lights, HUD

Launch prompt for each lane (separate session/agent each, all five at once):

Read docs/CONTRACTS.md, docs/DESIGN.md, and docs/briefs/LANE_X_….md, then implement the lane exactly as briefed. Work only inside your owned paths. Verify with your demo page and the acceptance checklist, write your HANDOFF.md, and ensure npm run typecheck passes.

Recommended: git init first and give each lane its own branch or worktree; ownership is disjoint so merges are trivial.

Run

npm i
npm run dev        # game shell at /, lane demos at /demo-<lane>.html
npm run build      # static bundle