Skip to content

Game: autopilot shifts a manual car; C is the car's view while playing; settings given twice are errors - #77

Merged
SamG-Coder merged 3 commits into
mainfrom
claude/maint-game
Nov 12, 2026
Merged

SamG-Coder merged 3 commits into
mainfrom
claude/maint-game

Conversation

@SamG-Coder

@SamG-Coder SamG-Coder commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

What and why

Loose ends from earlier reviews of vehicles and circuits (#64), from a maintenance pass over the engine.

  • Autopilot in a manual car. A car whose actor says vehicle PATH manual never changed gear when handed to the autopilot, because the autopilot never asks for a shift. While the car drives itself its driver now has the automatic gearbox. The player gets their own gearbox back when they take over, in whatever gear the car is in. Without a circuit the key does nothing, as before.
  • C in the native viewer was both the car's camera action and the viewer's next-weather key, and T moved the clock. While someone is played and not flying, those keys are now the game's. They are the viewer's again while flying (V). The page has no such keys.
  • Repeated lines. A .vehicle file took a second mass, gears or front spring=, and the last one silently won. A .track file took a second name, or l= twice on one point. Each is now an error that names the line the first was on. A setting may still be split across lines, as VehicleSpec::to_text writes front, as long as no key is given twice.
  • Docs: README (keys) and docs/gameplay.md.

Verified

  • New test a_manual_car_driving_itself_changes_gear_and_the_player_gets_their_gearbox_back. It fails without the fix (mutation-checked).
  • Mistake tables in spec.rs and track.rs cover each repeat. gt.vehicle and the to_text round trip still parse.
  • cargo test --workspace --release passes. fmt and clippy (-D warnings) are clean natively and for both wasm32 builds.
  • Nothing here runs in the renderer's frame, so there is no GPU change. The pass's shared before/after numbers follow.

Measured in Chrome on the RTX 5080

Main (8731867) against this pass's three branches merged together (#77, #78, #79), on the same scene files, each config run back to back. GPU time is the sum of every pass's timestamps per frame (a profiler injected into the page adds timestampWrites to each pass), averaged over 250 to 500 frames after streaming settles. Fixed view: ?time=12:00&day-length=0&weather=fair, default camera.

Config main GPU ms after GPU ms
Cove, High, 1280×720 2.356 2.324
Cove, High, 2560×1440 5.066 5.096
Forest, High, 1280×720 2.685 2.695
Forest, High, 2560×1440 (two runs each) 7.30, 7.53 7.41, 7.04
Temple, High, 1280×720 2.127 2.100
Temple, High, 2560×1440 4.787 4.818
Cove, Low, ?limits=webgpu 1.788 1.690
Forest, Low, ?limits=webgpu 1.586 1.556
Temple, Low, ?limits=webgpu 1.439 1.407
Forest, High, 720p, storm with the sun moving 2.838 2.904
  • Run-to-run noise is about 1–2% at 720p and about ±2.5% at 1440p in Forest, so every row is unchanged. None of these changes touches a per-frame path, so none was expected to change cost.
  • CPU per frame (the page's whole animation-frame tick) is 0.15–0.3 ms on both sides wherever the GPU keeps up.
  • Rendered output is unchanged. I captured native frames with --no-taa. Every after-vs-main PSNR falls inside main's own run-to-run spread, for example Temple 54–58 dB against 55.5–56.7 dB, and Cove storm 60.6–61.1 dB against 60.4 dB.
  • Found along the way (no change made): the steady frame is about 20 passes, one submit, 26 small buffer writes, and no per-frame bind groups or buffers. At 1440p in Forest, screen gi splits into integrate 1.04 ms (its occlusion search is 0.27 ms of that), reflections 0.67 ms and trace 0.55 ms.

Authorship

Written by: Claude Opus 5.5 through Claude Code

Reviewed by: Claude Sonnet 5.5. Approved with no correctness bugs. It checked:

  • that a manual car's restored gearbox survives reset and falling (put_back never touches the driver);
  • that change_gear is sane when switched on mid-drive (in neutral or a stale reverse);
  • that the viewer gating holds no borrow across the key handling and leaves no stuck keys;
  • that every to_text line round-trips and the error line numbers are right;
  • that the new test fails without the fix.

Fixed from its points:

  • With no circuit, the autopilot key still took a manual car's gearbox until a second press. It now does nothing there.

Noted, not changed:

  • C and T are the game's for a walker too, not only a car, which is what "while someone is played" means.

  • All code, text and comments in this pull request were written by a frontier AI model, with no human-written code, and will be reviewed by a frontier AI model before merging, as the Code of Conduct requires.

🤖 Generated with Claude Code

SamG-Coder and others added 3 commits November 13, 2026 07:46
…le playing; settings given twice are mistakes

A manual car handed to the autopilot stayed in the gear it was in, as the
autopilot never asks for a change: its driver now has the automatic gearbox
while it drives, and the player's own back when they take over.

In the native viewer C was both the car's next view and the next weather,
and T moved the clock: while someone is played, and not flying, those keys
are the game's.

A .vehicle file took a second mass, gears or front spring=, and the last
silently won; a .track file took a second name, or l= twice on a point.
Each is now an error naming the line the first was on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From review: with no track it took a manual car's gearbox and gave it back
only on a second press, while driving nothing.

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