TURNCRAFT/docs/briefs/SIDEB_SOCIAL.md
type-two 758e9dc4d3 SIDE B briefs + contracts: crate worlds, per-world quests, stamps
Contract: src/core/worlds.ts (three pocket worlds above the booth walls,
portal/entry/exit anchors, stamp count) + additive world/stamp bus events.
Briefs: SIDEB overview + WORLDS / MACHINES / SOCIAL(ambience) / AUDIO lanes,
rescoped around the already-shipped SOCIAL_RESET (emotes, reset ritual,
avatars) and first-five-minutes (heartbeat, beacons, flythrough) phases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 14:55:12 +10:00

2.2 KiB
Raw Permalink Blame History

SIDE B — Lane S: dust bunnies, portal FX, HUD stamp tray

Read docs/briefs/SIDEB.md + src/core/worlds.ts first. You own src/fx/** and src/ui/** — NOT src/net/Avatars.ts (the SOCIAL_RESET phase owns avatars/emotes now; docs/briefs/SOCIAL_RESET.md is required reading so you don't duplicate its FX). Consume bus events only — never import Lane M/W code.

S1. Dust bunnies (fx critters, purely cosmetic)

34 fist-sized fluff-balls (procedural: a tiny THREE group of 812 grey dust-tone quads, jittered) drifting around the under-table PCB floor (y≈3). Keep-out zones: the three portal rings (WORLD_DEFS[k].portalStand ±6) and the parts-bin/fuse quest spots. Wander slowly; flee 8 voxels when the player comes within 5 (ease out, never through walls — sample world.isSolid ahead); settle again. No colliders, no game effect. Emit machine:interact {action:'bunny_flee'} at most 1/s when spooked (Lane E2 squeaks). Budget: zero steady-state allocations, no fps regression.

S2. Portal + stamp FX

  • world:enter: 400 ms vinyl-warp iris — full-screen overlay of concentric groove rings collapsing to black, accent-tinted per world (WORLD_DEFS[k].accent); release on arrival. world:exit: reversed. (Coexist with the first-visit flythrough's cine override — never fight the camera; you're a screen overlay only.)
  • stamp:got: confetti burst (reuse the FxSystem burst pattern) + HUD toast via the tray (S3).
  • stamp:all: golden shimmer — a brief booth-wide emissive pulse via the existing setEmissiveBoost path, plus gold confetti at the crate.

S3. HUD stamp tray

Small tray top-right under the signal lamps: three record-stamp dots (accent-coloured when got, dim ring when not), scale-pulse on stamp:got, gold ring on stamp:all. Initial state comes from replayed stamp:got events on join (Lane M re-emits from the join snapshot — coordinate exact timing via handoffs).

Verify + handoff

Typecheck clean; exercise in the real game (turncraft-laneE-verify launch config) — bunnies wander/flee with zero console errors and measured fps unchanged; portal iris and tray driven by hand-emitted bus events. Handoff: docs/SIDEB_S_handoff.md.