Skip to content

WS5: rooms nobody tested — doors/windows, late planes, Move stage here, room tests - #12

Merged
karanheart96 merged 4 commits into
competition-hardeningfrom
competition-hardening-ws5-rooms
Nov 11, 2026
Merged

karanheart96 merged 4 commits into
competition-hardeningfrom
competition-hardening-ws5-rooms

Conversation

@karanheart96

@karanheart96 karanheart96 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

WS5 (P1): rooms nobody tested.

What changed

  • Wall choice moved into src/wall-choice.ts: pure geometry, unit-tested (18 tests), and shared by the runtime and the emulator tests. For plain walls the rules are unchanged: a vertical wall 0.6–4 m away, turned less than 40° from the view, with the spot straight ahead on its outline, and the stage about 33° wide.
  • Plane labels. Walls are accepted as wall, wall face or WALL_FACE in any spelling, or with no label. Before, only an exact wall was accepted, so a Quest that reports wall face would never get the stage on a wall. Doors and windows are recognised by those words. Anything else (invisible wall face, wall art, screen, furniture) is not used as a wall.
  • Doors and windows on the wall ahead keep the stage off them. It slides beside the opening when its centre can stay within 20° of straight ahead; otherwise the wall is refused and the paper screen is used.
  • The paper screen never sits behind something. If any vertical surface straight ahead is nearer than 2 m (a wall too close to use, a window), the screen stands 15 cm in front of it, never nearer than 0.9 m. Its width scales with distance so it stays at 33°.
  • Room data that arrives late still moves the stage from the paper screen onto the wall, but only in the first 12 s, before the story is under way.
  • "Move stage here" in Settings, replacing "Re-place stage on the wall ahead". Pinch it, then look where you want the stage: placement waits 1.5 s so you can turn, then runs from wherever you're facing. The Settings panel sits beside the old stage, which is why the wait is needed.
  • Diagnostics record the vertical plane labels the headset reports (vlabels, shown on the summary's placed: line), so the first device session settles the label question.
  • Automation hooks: __sp.room(planes) for fake planes, __sp.view() for placement and UI angles from straight ahead, and __sp.where(name).

Emulator results (node scripts/sim/rooms.mjs --gpu): 17/17 pass

Case Result
Ordinary wall at 2 m wall, ±16.5°
No planes at all paper screen at 2 m, after 4 s
Only floor and ceiling paper screen at 2 m
Wall too close (0.45 m) paper screen at 0.9 m
Wall too far (5 m) paper screen at 2 m
Wall turned 55° paper screen (1.85 m, in front of the wall)
Wall turned 30° wall
Labelled "wall face" wall
Window just right of centre wall, stage slid left of the window
Narrow window straight ahead paper screen at 1.83 m
Wide window straight ahead paper screen at 1.83 m
Door frame only paper screen at 1.85 m
Planes arrive after the timeout the wall takes over
Planes arrive 12+ s later stage stays on the paper screen
Recenter mid-story (head turned 60°) the stage was 43–76° to the side, and back to centre after recenter; story continues
"Move stage here" by hand pinch, then look left stage on the left wall, centred
Field of view, journal open captions and journal page within ±16° wide, 11° up, 13° down

Bug caught on the way

During the refactor, the new plane reader reused the stage-normal scratch vector. When the room had a floor plane, the paper screen came out facing the ceiling. view() caught it, and it's fixed (planeNormal).

Trade-offs (conservative option chosen)

  • Window straight ahead: I chose the paper screen in front of it, rather than sliding the stage more than 20° aside. A seated story is watched for minutes, so a turned head isn't worth it.
  • Late room data: only the first 12 s, so the stage never jumps mid-story. "Move stage here" is the escape hatch after that.
  • Not used: initiateRoomCapture (asking Quest to run Space Setup when no planes exist). It would interrupt the experience; the paper screen is the fallback.
  • Settings panel size kept. It's the one thing outside the comfortable field: 27° up, 25° down and 33° to the right at a 2 m wall. Shrinking it would make the text harder to read, and it's a menu you open on purpose. Device check E9b covers it.

Verified

  • npm test (now includes tests/wall-choice.test.mjs) and npm run build pass.
  • playtest.mjs --gpu: six personas, no stalls, no errors, 60 fps, performance budget ok.
  • live-family.mjs: passes with no errors. The Wi-Fi dropout recovered in about 2.5 s, and the story ended on the child's screen. With 30 s phases, the duet turn reached the child but didn't come back before the phase ended (the known 12 s idle timing). With 45 s phases it went to the child and came back.

Device items added (docs/DEVICE-TEST.md)

  • A4b: the plane labels from the summary.
  • A4c: window or door ahead.
  • E6: Move stage here.
  • E9: measured angles.
  • E9b: Settings comfort.
  • Open question: Quest's label strings.

🤖 Generated with Claude Code

Nexus Agent and others added 4 commits November 10, 2026 23:41
… data, close walls

- Walls are labelled wall / wall face (any spelling) or unlabelled; doors and
  windows on a wall keep the stage off them (sliding it at most 20 degrees aside).
- The paper screen stands in front of anything nearer than 2 m straight ahead
  (never nearer than 0.9 m).
- Room data arriving after the 4 s fallback still moves the stage onto the wall,
  within the first 12 s only.
- Re-placing on request waits 1.5 s so the player can turn toward the new spot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… by pinch, UI field of view

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s for rooms and UI field of view

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@karanheart96
karanheart96 merged commit 7c6b5d3 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