Draft preview: not yet live.

Explorer’s Lab › Orbit Lounge › Build log

Build log

Three camera views (Classic, Player, Dynamic)

Derek asked for view options. The original view is now Classic, and there are two new ones: Player (low, at the cabinet) and Dynamic (a closer camera that follows the ball). Switch with C, the pause menu or Settings.

Date
26 Nov 2026
Tool
Claude Code
Model
Claude Opus 5.5
Human
Derek
Autonomy
AI-led
Generation
Gen 1 (in development)

Goal

Derek asked for view options: “the current classic view, then a player view and a more dynamic view”.

What was done

  • Three views in src/render/scene.ts:
    • Classic: the original view, unchanged. It is the default.
    • Player: a lower eye line with the flippers close and the far end foreshortened, the whole playfield visible.
    • Dynamic: a closer camera that follows the ball. It looks ahead along the ball’s smoothed velocity, pulls back slightly at speed, and swings a little to the ball’s side for parallax. It settles on the Player view between balls.
  • Easing: the camera moves smoothly between views, and camera shake on nudges still works in all three.
  • Screen fitting: each view is fitted to the screen shape by projecting the table’s corners (binary search on distance, then on where the camera aims along the table).
  • Switching:
    • the C key (which no longer counts as “any key” for starting a game);
    • a View button in the pause menu, so touch players can switch mid-game;
    • a three-way switch in Settings.
    • The choice is saved with the other settings, and a short toast names the new view.
  • Docs: How to play, the title card’s key list, project.json (controls and showcase) and DESIGN.md (Camera views) updated.

What broke / dead ends

  • First portrait attempt: Player and Dynamic were fitted by centring the table. Portrait screens are limited by the table’s width, so the table floated small in the middle with empty space below. Fixed by sliding the aim point so the apron sits on the bottom edge. The same calculation sets Dynamic’s follow limits.
  • Dynamic swing: the first version swung too far towards the ball’s side; with the ball in the plunger lane, the left outlane went off screen. Reduced the swing.
  • Score display overlap: the top of Dynamic’s window sat under the score display, so its top limit was lowered.
  • Test scripts: the first follow test never launched the ball, because the game loop sets the plunger from the keys every frame. The test now launches by giving the ball upward speed. The first jerk figure also counted gaps across drains as single jumps; it now measures consecutive frames only.

Human interventions

Derek asked for the feature. No other input.

Verification

  • npm run typecheck: passes.
  • Headless Chrome (system Chrome, WebGPU), landscape 1280×800 and portrait 390×844: screenshots of each view; all three framed correctly after the portrait fix.
  • Dynamic follow test: 30 s per screen shape, ball fired up the table at 3 to 5 m/s whenever it reached the flippers.
    • The ball was on screen in all 1,719 (landscape) and 1,789 (portrait) sampled frames.
    • It touched the score display’s lower edge in 4 frames.
    • The largest camera move between frames was 3.3 cm (landscape) and 0.9 cm (portrait).
  • Controls test:
    • C on the title switches view without starting a game; C in play shows the toast;
    • the Settings switch and the pause menu’s View button both work;
    • the choice survives a reload.
    • No console errors.
  • npm test (physics, 15 tests), npm run build and npm run check (47 URLs; smoke tests for sniff-trail play and gen0, orbit-lounge play): all pass.
  • Not verified: feel on a real phone or tablet, or whether Dynamic causes motion sickness for some players.

Next steps

  • Play-test Dynamic on a phone; tune the follow speed (ease rate 6) and the look-ahead (0.16 s) if it feels laggy or busy.
  • Possibly a reduced-motion rule: start in Classic and turn off Dynamic’s swing when prefers-reduced-motion is set.