Commit Graph

4 Commits

Author SHA1 Message Date
jing
05c2765bd8 SOCIAL_RESET: avatars, emotes, the reset ritual, who's-here roster
Built by the Opus session per docs/briefs/SOCIAL_RESET.md; integrated and
verified by Fable (typecheck clean, relay validation reviewed, 3D avatar
gear/face pixel-confirmed live — the one item the build session couldn't
capture in its frozen preview pane).

- Avatars: hue/gear/face enums in src/net/avatarLook.ts shared by the 3D
  build and the Menu AVATAR tab's 2D mirror; live sync with client-side
  coalescing (two-tab testing caught the relay rate limit permanently
  desyncing rapid editors - trailing send fixes convergence).
- Emotes Z/X/C/V: wave, beat-synced nod, point, rate-limited airhorn
  (detuned saws + confetti), server + client caps.
- Reset ritual: after a win the fuse takes a deliberate 5s hold (reuses
  the workshop radial meter as the warning dial) -> server-authoritative
  reset with 10-min cooldown; music brakes to silence, lights die over 3s,
  workshop resets to wires-off with a SERVER-generated random weight notch
  (both tabs land identical), player builds survive, quest replayable.
- Roster: hold Tab for who's-in-the-booth with hue swatches.
- interact/ addition (flagged friction): additive setBreakGuard hook so
  interaction.ts never learns what a fuse is.
- launch.json: main dev config uses autoPort (5173 collisions with
  parallel sessions).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 02:01:42 +10:00
jing
9c668d340c Headshell Workshop + Glow-Up phase: assembly minigame, art pass, review fixes
- Workshop (WORKSHOP_CARTRIDGE): five-stage cartridge assembly at Deck A —
  seat/square, crimp four tag-wires, torque screws, ride-the-arm counterweight
  balance, needle-drop diagnostic with per-fault audio + scope. Relay-synced
  (per-field co-op merge: held screw + carried wire survive remote state).
- Glow-Up (G1-G5): 32px atlas with per-voxel variants, selective LED bloom
  (quality-gated), screen-print decal system + party flyers, mixer/PCB worldgen
  density pass, record groove-sheen side texture.
- 10 confirmed multi-agent review fixes, incl. co-op screw-stomp soft-lock,
  ride-snap collider-identity (magnet feet / eaten record-fling), workshop SFX
  exact-match map (rca_seated hijack), beam ride colliders to the head,
  double-crimp guard, WIRING INCOMPLETE diagnosis mode, skate-abort timer,
  completedState wiring, per-tick material churn, trackingHeavy platter drag.
- Crossfader playtest fix: slew-limited sled (3.4 v/s) + ribbed grip caps with
  amber index — the sled reads as a heavy handle, not a teleporting wall.
- Demo harnesses: machinesDemo hold-key wiring, playerDemo seesaw phase
  continuity, audioDemo incomplete fault button.
- Workshop sync: exact 1.0 screw endpoint gets its own emit signature.

Verified: typecheck + vite build clean, live solo quest smoke, two-client
co-op relay smoke (simultaneous torque, no rewind, exact convergence).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 21:32:07 +10:00
jing
b9ea2f7258 Deploy scripts + relay edit-cap (ship-check finding)
- deploy/deploy.sh: build --base=/turncraft/ -> stage -> docker cp into
  forum-nginx -> reload -> curl verify; syncs relay code + restarts it.
- deploy/setup-relay.sh: one-time relay container on forum-nginx's docker
  network + the nginx location block for /turncraft/ws.
- relay: MAX_EDITS=400k grief ceiling (unbounded diff map could reach
  ~550MB if a bot painted the whole booth).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 23:11:54 +10:00
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