Skip to content

WS6: first five minutes and pause/resume - #14

Merged
karanheart96 merged 5 commits into
competition-hardeningfrom
competition-hardening-ws6-first-minutes
Nov 11, 2026
Merged

karanheart96 merged 5 commits into
competition-hardeningfrom
competition-hardening-ws6-first-minutes

Conversation

@karanheart96

@karanheart96 karanheart96 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

WS6 (P1): the first five minutes, and pause/resume.

1. Time from Enter XR to the first creature (bots, fresh first launch)

node scripts/sim/first-minutes.mjs --gpu

Persona Rabbit asked First creature wakes Captions / words before it
perfect 50.2 s 50.7 s 12 / 137
small 49.9 s 50.5 s 12 / 137
slow (open hand for 25 s, whatever the screen shows) 50.4 s 76.0 s 12 / 137

The opening runs about 50 s before the rabbit is asked for:

  • 5 s placement scan (the emulator falls back at 4 s);
  • two chapter cards of 3.2 s each;
  • eight narrated lines, each as long as its voice clip;
  • "Mo follows your fingertip", which teaches by doing.

A child who copies the shape quickly is under 60 s. The bots can't model a real first-timer learning the rabbit, so I improved the teaching rather than cutting story lines (the conservative choice):

  • The first shape a session asks for shows the ghost hand after 2 s, not 15 s. After that the hint setting applies, and "Off" is always respected. Measured: 2.0 s.
  • Diagnostics now report the real number: the summary prints first creature: N s after entering XR (device item A9).

Options I didn't take: shortening the chapter cards (saves about 1.4 s) or cutting intro lines (changes the story). If the headset numbers come in over 60 s, cutting the "lighthouse" line or the Chapter One card would be the next step, and I'd ask first.

2. The first payoff

On waking, a creature already gets a chime, the puppet comes alive, and the narration answers ("A rabbit! Quick, and kind."). New: the lamp light swells warmly and settles over about a second whenever a creature wakes.

3. Pause and resume

  • Bug: only visible-blurred (the Quest menu) paused the story. hidden (headset off, app in the background) didn't. Fixed.
  • Bug: a hidden XR session runs no frames, so the per-frame pause code never ran and narration could keep playing. A new src/away.ts signal is set from the visibility events themselves (XR visibility plus page visibilitychange). Narration, sound effects and the lamp hum (the AudioContext is suspended) and Live voice all pause on it immediately. For Live voice, the context is suspended, so the mic isn't sent, and incoming voice is dropped rather than queued.
  • Bug: the engine doesn't clamp frame time, so returning after 30 s with the headset off would have pushed the story timers forward 30 s. The story's step is now capped at 0.25 s.
  • The caption while away is now Paused. It used to say "Pinch the lamp switch to continue", which was wrong behind the Quest menu.
  • Session ended mid-story: the next launch already continued from the saved chapter. It now says so: "Welcome back. Continuing from Chapter One: The Field. To start again, open the Shadow Journal." Settings beside the journal has Replay and Play a chapter.

4. Accessibility from the first screen

One-hand mode and Forgiving shapes are now one tap each on the first screen, before Enter XR, under the family chip. They write the same Settings the in-headset panel uses, are remembered, and are reflected in the headset.

On phone-width screens the family chip used to sit under the Enter XR button (this predates WS6); both chips now sit below it.

Tests

  • node scripts/sim/session-life.mjs --gpu: 6/6.
    • First-screen toggles are visible, apply and are remembered after a reload.
    • Quest menu: the story pauses with caption Paused. and narration silent; it resumes on the same line.
    • Headset off for 10 s: narration silent, and no beats skipped on return.
    • The first ghost hand appears at 2.0 s.
    • The wake flare fires.
    • Reloading mid-Chapter One continues there, with the welcome-back caption.
  • npm test and npm run build pass.
  • playtest.mjs --gpu: six personas, no stalls, 0 errors, 60 fps, budget ok.
  • live-family.mjs --seconds-per-phase 45: pass. Dropout recovered in 2.1 s; turn there and back; the story ended on the child's screen.
  • rooms.mjs --gpu: 17/17. A test bug was fixed along the way: it read the eye height before the XR session started, which shifted the fake doors and windows below eye level. It now waits for the session and refuses to run otherwise.

Device items (docs/DEVICE-TEST.md)

  • A0: first-screen toggles.
  • A9: first creature time on a first launch.
  • A10: the payoff.
  • E1/E2: menu and headset off, nothing skipped, Live voice stops.
  • E10: welcome back.

🤖 Generated with Claude Code

Nexus Agent and others added 5 commits November 11, 2026 00:40
- The Quest menu, headset off or a hidden page pauses story, narration, sound
  and Live voice, from the visibility events themselves (a hidden session runs
  no frames). 'hidden' now pauses too (only 'visible-blurred' did); the caption
  says just 'Paused.'; the story's step is capped so returning does not skip ahead.
- The first shape a session asks for shows the ghost hand after 2 s (then the
  hint setting applies; Off is respected).
- A returning player's chapter card says 'Welcome back. Continuing from ...'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… entering XR

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…irst creature in diagnostics

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stage is 'ready' in the 2D view before the session starts; reading the
eye height then shifted the fake planes, so doors and windows fell below eye
level and were ignored (a test bug: 4 cases failed depending on timing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@karanheart96
karanheart96 merged commit 9d2d74b into competition-hardening Nov 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant