REAR MOTOR / RADIO CONTROL ONLINE / BUGGY LAB v0.14
Playable handling prototype for 1:10 electric 2WD and 4WD buggies. This release
matches rearmotor.com's white, electric-blue and monospace identity, puts the
compact pipe circuits first, and adds an online race room: per-class lap boards,
initials and optional Instagram handles, real live cars, and recorded opponents.
The accepted handling, modified cars, calibration, per-car setups and synthesized
sound remain the baseline. Practice works without joining the online race room.

LIVE VERSION
https://rear-motor-buggy-lab.taylorsizem-re.chatgpt.site
Open this link on another computer or share it. Download editable source from
Pit menu > Audio & view to continue development. Local edits need republishing.

START
Double-click Start Buggy Lab.cmd. It starts the local server and opens your default
browser. Chrome or Edge is recommended for USB controller input. Install Node.js
22.13.0 or later if it is not available; Node.js 24 is recommended. The launcher
checks the installed version, then tries the bundled Codex runtime if available.
The local server uses Node's built-in SQLite support, so npm installation is not
needed for local driving or local leaderboard testing.
Alternatively, run node server.mjs here and open http://127.0.0.1:4317.
The local server listens only on this computer and runs until Windows closes it.
If an older server is already using that address, close its process and restart
the launcher after updating. Local race records live in .sites-runtime/ and are
separate from the public hosted board. Multiple tabs on the same local server
can share that local room; they do not join drivers on the published website.

NOBLE NB4
Leave the powered transmitter connected to its USB data port. On startup, move
the wheel or trigger to wake browser input. The app automatically restores your
saved calibration and transmitter mode; no unplugging or repeat calibration is
needed. Use the same browser and address where you calibrated it.

For first-time setup or changed controls, open transmitter settings and click
Calibrate transmitter once. Follow the instruction and hold-progress indicator:
neutral, full left, full right, full throttle, full brake. A steady hold of about
a second confirms each position before moving to the next step. The vintage radio
model and meters show live wheel and trigger input. There is no deadline: wrong
directions or moving controls reset the hold. Cancel or close to keep the previous
calibration. Switching away clears the current hold. Release all
controls after completion, then click Drive with transmitter.
Calibration remembers channel order, polarity, neutral, and endpoints in this
browser. Local and hosted versions each need their own calibration.
If no device appears, check Windows "Set up USB game controllers" (joy.cpl).
If Windows sees it but the browser does not, try current Edge or Chrome.
This prototype consumes standard browser Gamepad input; physical NB4 operation
requires the controller to be exposed by Windows and the browser.

CONTROLS
Arrows or WASD: steer, forward throttle, braking / reverse.
Space: pause/resume. R: reset car. C: cycle driver stand, three-quarter and overhead cameras. +/- buttons: zoom.
Fit returns to the largest whole-track view between the driving HUD controls.
Changing track, switching camera or resizing the view also restores whole-track
fit. Manual zoom can enlarge beyond the track edges; Fit brings them back.
P: Pit menu. M: mute/unmute. Pit controls work in fullscreen too.
F or Fullscreen: enter/exit fullscreen. Escape also exits native fullscreen.
Fullscreen keeps pause/reset buttons visible at the bottom of the driving view.

Reverse: brake to a stop, release to neutral, then press in the brake direction
again. Holding the first brake press never engages reverse. A second press made
while moving still brakes; release and press again after stopping. Reverse is
a gentle maneuvering gear. Pull the trigger forward to brake backward travel,
then drive forward. Neutral slows either direction. The same sequence works with
Down / S on the keyboard. Pause, controller loss, and Reset car clear reverse arming.
To switch to the keyboard, open controller setup and choose Use keyboard instead.

PIT MENU AND PAUSING
All controls now sit inside the game viewport. Pit menu opens Driver home and
also holds Garage, Handling, Practice, Audio & view, and Race room. Opening
it pauses driving. After changing track, car or handling settings, close the menu
and driving continues automatically when the transmitter has been neutral for
0.15 seconds. The same automatic return applies when you opened the menu during
an active drive without changing anything. Center the wheel and release the
trigger; no Resume click is needed. A deliberately paused session stays paused
when you only inspect the menu. Losing window focus or disconnecting a controller
still pauses the game and cancels any pending automatic return.

HANDLING
Calm, Balanced and Responsive combine steering and launch settings into a driving
feel. Pace adjusts power and motor ceiling together from 70 to 115%. Balanced at
100% restores the current buggy baseline. Existing custom setups stay exact until
you choose a preset or adjust a value. The separate Technical workshop retains all
nine sliders; Sound workshop holds the detailed audio controls. These are local
tuning tools, not a privileged admin backend. See TUNING.md for the shared schema.

CAR MODELS
Choose a car in Pit menu > Garage. Modified models appear first, with separate
Modified and Club filters:
The current car and track have preview cards. Open either card to browse the
garage or track gallery. Track previews show the actual layout, jumps, surface,
length and lane width; car cards show their color, drive type and class.
Choosing a card restores that car's saved preferences or loads the selected
course, and returns to the current selection. Quick lists are also available.
 - RM-01 Classic / 2WD: nimble, with a lively corner entry.
 - RM-02 Planted / 2WD: longer and lower, with more rear grip and a calmer response.
 - RM-03 Four / 4WD: drives and brakes through both axles for a different feel.
 - RM-04 2WD Modified: planted modern rear-drive chassis, stronger motor torque
   and higher motor RPM. Start with partial throttle on the compact tracks.
 - RM-05 4WD Modified: driven front/rear axles with stronger motor output.
Each car auto-saves its own handling, motor settings, sound texture, volume and
mute choice. Switching cars restores that car's setup and sound immediately.
Your previous shared setup and sound are copied once to the original three cars;
the two modified cars start with individual presets. USB calibration is shared
across your garage and is not changed. Restore baseline and Reset this car's
sound affect only the selected car. Tracks do not overwrite any car's setup.
These are original tuned chassis models, not replicas of named commercial cars.

HANDLING SETUP
Use small steering inputs on the straight and brake before the tight turns.
The deceleration model now limits braking torque against remaining tire capacity
in a turn, reserving some lateral grip to make the rear less eager to slide.
Lift-off weight transfer and combined tire grip still matter: aggressive braking
and steering can still rotate the buggy. This is a tunable approximation rather
than measured brake electronics or a guarantee against a spin.

The original three cars' default handling baseline matches the accepted screenshot, with added
top-speed headroom:
115% motor power, 100% acceleration punch, 2.00 grip, 22 degrees steering,
3% steering softness, 50% rear weight, 10% high-speed push, 20% lift-off drag,
and 115% top speed. Your existing saved handling values are retained on update;
modified cars use separate chassis/motor presets. Their Top speed percentage is
relative to their own motor; it is not directly comparable with a stock car.

Motor power has a 35-150% range, acceleration punch 0-200%, lift-off drag 0-70%,
and top speed 80-140%. Power above 100% adds low/mid-speed torque and fades out
before the top end. Punch strengthens low/mid-speed response; higher values can
produce wheelspin. Top speed is now a separate adjustment. Its percentage is a
motor-speed setting, not a promise that every track or setup reaches that speed.
Lift-off drag sets neutral braking; a stronger brake command adds more braking.
Steering travel, softness, tire grip, rear weight and high-speed push remain
adjustable. Reset car keeps your setup. Slider changes save in this browser.

TRACKS
Seven layouts are selectable in Pit menu > Garage. Featured opens with the three
compact pipe circuits. Club Carpet is the default for a new visitor:
 - Club Carpet / Technical: 26 x 16 m floor, 2.8 m lanes, double/triple.
 - Tacoma Club / Clay: TRCR-inspired 25 x 15 m floor, 2.6 m lanes, double/triple.
 - SoCal Rhythm / Clay: OCRC-inspired 24 x 16 m floor, 2.6 m lanes, two triples.
These fully surfaced rectangular floors have close-set parallel straights and
rounded hairpins. Their smaller footprint makes the buggy easier to see without
changing the size of the simulated car.
All tracks also includes:
 - The Loop / Flat: the familiar 73.8 m practice loop, without jumps.
 - The Loop / Small jumps: the same course with two 10-12 cm tabletops.
 - Eifel Carpet / Inspired: a 144.5 m course with a long straight, flowing infield
   and four low tabletops, including a spaced rhythm pair.
 - Arena Flow / Inspired: a 154.5 m course with a sweeping return, technical
   infield and three low tabletops, including a spaced rhythm pair.
Loop variants retain 3.2 m lanes; Eifel Carpet and Arena Flow have 3.4 m lanes.
Pine Beach and Vegas Vintage are retired from selection. Their geometry remains
in the source for old-record compatibility; saved selection of a retired track
returns to the featured default. Rail spacing and landing room are checked.
Clay uses 88% of the selected tire-grip coefficient and slightly greater rolling
resistance; these are tuning assumptions, not measured track data. Carpet retains
the accepted grip model. Clay and carpet have distinct floor, pipe and jump
visuals. Raised pipes mark the lane edges; contact still contains the car
horizontally, including in flight. Jumping over a pipe is not simulated.

Race sections have separate rounded takeoff/landing mounds and actual floor-level
gaps. A double is two mounds; a triple is three. Heights are roughly 0.3-0.4 m,
with sections spanning 5-7 m. Approach speed matters: under-speed cases a mound,
matching the landing face is smoother, and excess speed can land on the flat.
They are original race-inspired designs rather than surveyed replicas of TRCR,
OCRC or a particular carpet event. Start on a double with partial throttle and
learn the landing before attempting the whole triple. Air steering cannot turn
the car; throttle/brake can make a small airborne pitch correction.

Track selection is remembered in this browser. Changing track starts a fresh
session; matching saved personal bests and ghosts reload. Handling and NB4
calibration stay. Reset car retains the selected track. Start with a partial
trigger over a jump, then build speed. Steering cannot generate tire force while
airborne. Cross the checkered line in the direction the car initially faces to
begin timing. A counted lap requires all sectors in sequence.

EOS inspiration references, from the event organizer:
 - Daun 2023 track check and track walk:
   https://www.eos.racing/2023/02/03/eos-track-check-sporthotel-grafenwald-daun-ger-rd3-season-10-2022-23/
 - Daun 2025 4WD A3 race report, including linked jumps and corner exits:
   https://www.eos.racing/2025/02/02/madness-in-daun-kilic-wins-4wd-from-4th-on-the-grid/
Compact track references:
 - Tacoma R/C Raceway, organizer facility/racing pages:
   https://www.tacomarc.com/about-us.html
   https://www.tacomarc.com/racing.html
 - Jared Tebo, first-person 2016 Reedy Race recap at OCRC, including two triples:
   https://jtprc.com/2016/01/25/2016-reedy-race-recap/
 - 1066 Racing, club indoor carpet dimensions and jump furniture:
   https://1066racing.com/
Other course references are stored with the layouts in game/tracks.js.

PRACTICE, PERSONAL BESTS AND GHOSTS
Practice shows six numbered inside-corner rings. Passing through turns a ring
green, once per lap. These centerline-curvature cues are a forgiving consistency
exercise, not an optimal racing line. Apex hits do not affect vehicle physics.
Try three clean laps in a row, then improve apex accuracy and finally lap time.
Wall touches break the clean streak, but do not by themselves disqualify a ghost.

The fastest valid lap completed without a stop saves a translucent cyan ghost.
A stop means speed below 0.05 m/s for at least 0.15 seconds during the timed lap.
A brief near-zero sample does not count; time spent paused does not accumulate
the stop timer. Brushing an edge is allowed if you keep moving. A full stop,
reverse, reset, shortcut or skipped sector prevents that attempt becoming a PB
or ghost. Missing apex targets does not disqualify an otherwise valid attempt.

The ghost starts with you at the line and cannot collide. Clean-lap coaching
remains separate from nonstop-lap PB eligibility. LAST and LAPS include completed
laps that do not qualify for a ghost. Reset car discards the current attempt and
clean streak while keeping completed history and PB. Clear session keeps the
PB/ghost. Target and ghost visibility are independently optional.

Records are separate for each track geometry, car model and handling setup.
Returning to that combination restores its record. Race jump profile and surface
changes are included in the record key; older flat/practice records keep their
existing comparison when the car and handling are unchanged. Guest personal PBs,
ghosts, audio choices and calibration stay in that browser. Optional Driver home
accounts save private best laps and named handling setups across devices. The
separate online board shares only laps you submit; transmitter calibration and
sound preferences remain local.
Ghost recording is 20 Hz, interpolated for rendering, and capped at five minutes.
Bad or foreign records are rejected. If browser storage is full, your new PB
still works for the current session.

ONLINE RACE ROOM
Open Pit menu > Race room. The class board can be viewed without joining. Enter
1-4 letters or numbers for your initials, add an optional Instagram handle, and
choose Join online. Handles are public profile links, not verified identities.
Joining shares your initials, handle and live car position with the room while
you drive. The saved browser session remembers your driver card and joined state.
Leave room stops sharing your position. Opening the pit, pausing, losing focus
or hiding the page removes your live car; stale cars also expire automatically.
If the connection drops, practice continues and online requests retry.

The lap board is separate for each track layout, handling-model version and class:
 - 2WD Club: RM-01 Classic and RM-02 Planted.
 - 4WD Club: RM-03 Four.
 - 2WD Modified: RM-04 2WD Modified.
 - 4WD Modified: RM-05 4WD Modified.
Class follows the chassis, not a power slider. Setups remain adjustable within
each class. The class filter initially follows your current car and can be
changed to browse the other boards. The fastest submitted lap per driver and
class is kept; a slower submission does not replace a faster score.

Complete a valid nonstop lap, then explicitly choose Submit latest lap in Race
room. Joining does not automatically post times. The car must pass the sectors
in order, keep moving, and finish without reversing or resetting. Edge touches
are allowed. The upload includes lap timing and a replay so others can view the
lap as a ghost. Server checks reject malformed records, missing sectors, stops
and implausible movement. This is a casual community board, not a secure racing
competition: the server does not run an authoritative copy of the vehicle physics.

Show live drivers displays other real drivers on the same circuit, including
other car classes. Cars to show selects a combined maximum of 0-8 other cars.
Live cars have priority; Show leaderboard ghosts fills remaining places with
recorded laps from the displayed class board. Ghosts are labeled as recorded
opponents. Your personal-best ghost remains a separate Practice option.
Other cars are visual and cannot hit your car or alter its physics. There are
no generated AI drivers. An empty room means no one else is currently driving
there; it is not filled with invented participants or scores.

Public scores and sessions are stored by the hosted service. Saved account laps
and named setups are private until a driver explicitly posts a lap. Sound settings
and USB calibration stay in browser storage. The editable source download excludes
production data, session credentials and local SQLite files.

DRIVER HOME AND EMAIL SIGN-IN — OPERATIONS
Guest driving remains available without email or an account. Driver home offers
optional emailed-code sign-in, personal bests, named setups, public standings and
practice summaries. A private PB is retained per track revision/physics version
and racing class. Browser-local records still retain their per-car/setup keys.
Deleting a private saved copy does not remove an already published leaderboard
entry. Account emails are never included in public leaderboard/presence responses.
Sign-in emails do not enroll anyone in a newsletter.

Configure these server-side environment bindings on the published Site:
 - RESEND_API_KEY: a Resend key authorized to send email.
 - DRIVER_EMAIL_FROM: a sender on a verified Resend domain, for example
   Rear Motor <signin@rearmotor.com> once that domain is verified.
 - DRIVER_AUTH_SECRET: a stable, randomly generated secret of at least 32
   non-whitespace characters, used to authenticate sign-in codes.
Keep the API key and authentication secret in the host's secret store. Never
commit them, expose them to browser bundles, or put them in downloaded source.
The local server reads the same names from its process environment. A local
SQLite database and local-origin cookies remain separate from production.

GET /api/driver/session reports emailEnabled. Missing configuration disables
email sign-in with a 503 response while leaving guest practice available. A
configured provider rejection returns email_delivery_failed and invalidates
the unsent challenge. Codes are not returned by an API or logged; automated
checks inject an in-memory test sender instead of delivering real email.

Codes expire after ten minutes, allow at most five attempts, are bound to the
requesting browser, and are consumed atomically once. Requests are limited to
three per email and twenty per connection in fifteen-minute windows. Account
sessions use hashed tokens in HttpOnly, Secure, SameSite=Lax cookies (Secure is
omitted for localhost HTTP). Sessions last ninety days; at most twelve devices
are retained, and signing out revokes the current device only.

Linking existing guest public laps requires the valid rm_driver cookie from
that browser and an explicit choice. Initials and supplied driver IDs cannot
prove ownership. A successful claim revokes the guest token and merges public
PBs into the account, retaining the faster result in each class. Existing
accounts can claim another browser's guest scores by signing in there. Linking
local browser records is separate and keeps the local copies. A domain change
does not transfer browser cookies or calibration automatically; link existing
guest data on its original origin before switching addresses.

Practice time and completed/valid lap totals start when this release begins
recording active driving; earlier playtime is unknown and is not estimated.
Paused menus, the landing replay and inactive tabs do not count. Upload chunks
are idempotent. An old PB without a recorded date keeps a null date rather than
inventing a historical session. Improvement compares the first recorded evidence
with the best lap for that track revision and class; recent timing samples are
bounded to 300 per account. These are casual practice metrics, not authoritative
anti-cheat or verified competition results.

The additive Drizzle migration 0002_warm_xavin.sql creates account/session,
private lap/setup and practice tables and marks claimed guest identities. It
preserves existing drivers and public laps. Apply migrations through the same
Sites deployment workflow before serving the new API; never rewrite migrations
already applied to the public database. The local launcher applies the same
migrations to its separate SQLite database. Run node driver-account-checks.mjs
and node online-server-checks.mjs to verify sign-in/claim races, ownership,
provider failure, private/public separation and preservation of existing PBs.

SOUND
Sound is synthesized locally with Web Audio: wheel speed drives the motor whine
and gear harmonics. Actual acceleration adds motor and gearbox strain; a held
trigger at steady speed settles to a lighter voice, and coasting relaxes it
further. Active braking adds a separate higher strain tone that fades as the
wheels stop. Free-spinning airborne wheels carry less load. Grounded slip adds
subtle scrub, and landings/contact create brief thumps. No recordings, music, combustion idle,
or gear shifts are used. Volume defaults to 35%; M mutes. Driving sound starts on
a Drive or enable-sound click, and goes quiet on pause, blur, or menu entry. Your
volume and mute choice persist. A blocked/unsupported audio device never stops
driving. Test the sound mix with your own speakers/headphones.

In Pit menu > Audio & view, Shape your sound has six sensitive 0-100% controls:
Motor pitch, Brightness, Motor roughness, Gear whine, FM texture and Tire texture.
Pitch spans 0.5x to 4x over three octaves; Brightness spans a muffled filter to
exposed upper harmonics. Gear whine is fully off at zero and adds a strong high
whistle at its upper end. FM texture makes metallic/experimental tones. These
are broad sound-design ranges. Master Volume remains separate and the output
has a limiter. Each car has a distinct initial voice; all changes auto-save for
that car. Reset this car's sound restores only its texture preset.
Click Preview with transmitter to hear adjustments while parked.
Pull the NB4 trigger to rev, push to brake, and turn the wheel while revving to
preview tire scrub. With no calibrated transmitter, use the Test trigger slider.
The preview uses a separate virtual sound state; the real car stays paused and
does not move. Its status shows acceleration, cruising, coasting or braking.
Stop preview ends it; closing the pit menu, switching its tab or
leaving the window also stops it.

Race reference located: Red RC, 2WD Buggy A-Main Leg 1 at MIBO International 2025:
https://www.youtube.com/watch?v=lylOYHLSAgs
The research tools could not audition its soundtrack. Frequencies and mix are
original tuning choices, not a measured match to the recording.

SHARING AND CONTINUING ON ANOTHER COMPUTER
Copy link with this setup on the hosted page makes a link with the selected car
and handling values. Transmitter profiles and calibration never enter the link.
Open the published website on another computer to drive without installing.
To edit, choose Download editable source in Pit menu > Audio & view, unzip it, and open
that folder in your editor or Codex. Install Node.js >=22.13.0 (24 recommended).
Run node server.mjs, or Start Buggy Lab.cmd on Windows. Edit the game/ files and
refresh the browser. Run node tests.mjs for the automated checks. This local path
needs no npm install; its SQLite lap board stays on that computer.

The published site now uses a Worker and a persistent D1 database. It is not a
static dist/ upload. app/ routes connect the game to server/ endpoints; db/ and
drizzle/ describe the tables and migrations. Framework builds need dependencies:
run npm ci, then npm run build once a Sites project has been connected. game/ is
the source for browser assets; generated dist/ is build output and should not be
edited. The simple local server remains useful without framework setup.

To publish changes to the same Site, give the Sites plugin the existing live URL
while signed into the owner account. Let its source/publish workflow configure
the project and apply database migrations. Hosting identity is deliberately left
out of downloaded source, so framework dev/build requires that project setup
first. Do not create a new public leaderboard by accident when continuing this
site. Local edits never automatically update the published version.

Package source.ps1 regenerates game/buggy-lab-source.zip. It includes editable
browser and server code, build helpers, schema/migrations, dependency lockfile,
licenses, tests, launchers and these notes. It excludes node_modules, generated
dist, runtime databases, environment files, Git data, hosting identity and the
ZIP itself. Repackage before the publishing build so its download stays current.
The hosted URL and each browser have separate calibration storage: run timed
transmitter calibration once in a new browser/origin. Existing calibration stays.

MODEL AND LIMITS
Independent four-contact tire forces, combined longitudinal/lateral grip,
wheel rotational inertia, a simple differential, quasi-static load transfer,
finite steering response, and 500 Hz integration. The 2WD models drive and brake
the rear axle; the 4WD models distribute drive and braking between both axles. Chassis
dimensions, weight distribution, tire response and inertia are tuning assumptions.
They are not measurements of a named RC car.

Roll/pitch include visual acceleration lean. Jumps add ramp height and grade,
slope gravity, takeoff velocity, ballistic airtime, reduced contact on ramps,
and landing impulses. Wheel spin/braking can gently change airborne pitch.
This is a simplified whole-car terrain contact model, not four-wheel vertical
suspension. There is no traction roll, tire-temperature model, or measured damper
model yet. Lane barriers still contain the car horizontally during a jump.
Barriers use a rounded chassis footprint with contact-point impulses and low
friction, allowing glancing impacts to slide along the edge. A direct head-on
impact still stops the car. Graphics are procedural Canvas.
No VRC code or assets are included. Realism and real-track transfer of training
have not been validated against a measured car. This remains a drive-and-adjust
prototype. See handling-notes.txt and jump-notes.txt for earlier research and limits.

VALIDATION
Run node tests.mjs with Node.js >=22.13.0 for physics, track geometry, jump, setup, training, sound,
per-car persistence, controller and UI-flow checks. Tests cover rest stability, bounded motion,
braking, steering, contact energy, chassis containment, usable jump airtime,
landing, reverse, record eligibility and separation, saved calibration and
neutral-start behavior, online validation and sessions, leaderboard class isolation,
manual submissions, presence expiry, replay rendering and connection recovery. Historical v0.6 trajectories remain in regression tests;
its original 2.1 m geometry and immutable ZIP are retained as a reference.

Physical NB4 check on 2026-10-14: the user confirmed moving channels and correct
steering, acceleration, and braking after calibration. The user also confirmed
double-press reverse and accepted v0.6's wider track as a baseline for later work.
Automated input checks do not substitute for driving the latest changes on the
physical transmitter. The new cars and corner-entry response need that feedback.

FILES
 game/physics.js: vehicle model, jump integration, lap timing.
 game/models.js: model definitions and per-chassis tuning assumptions.
 game/tracks.js: course geometry, featured/retired lists, jumps and references.
 game/terrain.js: smooth tabletop and double/triple heights.
 game/garage.js: per-car persistence and one-time legacy migration.
 game/training.js: apex targets, eligibility, private records and ghost replay.
 game/audio.js: synthesized motor, tire and impact audio.
 game/setup.js: handling ranges and portable setup links.
 game/controller.js and calibration.js: Gamepad input and guided steady holds.
 game/transmitter-view.js and .css: articulated vintage radio and live meters.
 game/handling.js: drive-feel / pace macros and technical control schema.
 TUNING.md: macro behavior and future admin interface groundwork.
 game/esc.js: brake / neutral / reverse sequence.
 game/app.js: UI, input polling and fixed-step simulation.
 game/renderer.js: cached track/ramp layers and moving cars with pipe occlusion.
 game/race-buggy.js: compact race-scale silhouettes with live wheel steering.
 game/selection.js: track and car galleries; previews generated only when opened.
 game/online.js: driver sessions, manual lap uploads and live-car client.
 game/index.html, style.css and cockpit.css: viewport controls and pit interface.
 game/rear-motor-mark.svg: official mark from the public rearmotor.com site.
 game/ibm-plex-mono-*.ttf and IBM-Plex-Mono-OFL.txt: local fonts and license.
 app/route.ts: HTML response; app/api/online/[endpoint]/route.ts: hosted API route.
 server/online.js and validation.js: shared online service and input checks.
 server/accounts.js and email.js: private driver home, email codes and sessions.
 app/api/driver/[endpoint]/route.ts: hosted driver account API.
 game/driver-home.js and driver-home.css: optional account home interface.
 game/driver-journal.js: local driving summaries and saved-record handoff.
 server/local-db.js: Node SQLite adapter and local migration runner.
 db/schema.ts and drizzle/: database schema and SQL migrations.
 server.mjs: local game/API server on 127.0.0.1:4317.
 build/, scripts/, lib/, vendor/: retained Sites/framework build support.
 package.json and package-lock.json: framework dependency versions.
 vite.config.ts and other root config files: hosted build configuration.
 tests.mjs and *-checks.mjs: simulation, browser-flow and online checks.
 Start Buggy Lab.cmd / .ps1: Windows local launcher.
 Package source.ps1: editable download packager.

BRAND REFERENCE
https://rearmotor.com/
The UI follows the site's white background, #000fff blue, IBM Plex Mono, fine
outlines and compact modular navigation. Brand assets and fonts are local; the
driving screen does not depend on fetching them from the store at runtime.

MINIMAL SIMULATOR DIRECTION — OCTOBER 2026
Driving response takes priority over decorative detail. The minimal pass removes
park scenery, buildings, drivers, stands, and the track editor. It keeps the
quiet display-car landing page, white/cobalt site navigation, transmitter
calibration, keyboard input, camera choices, lap timing, and existing handling.
All five car setups and existing courses remain available because inactive
catalogue choices do not add recurring scene-rendering cost.

Track, pipe, and start-line artwork is cached for the current viewport. Cropped
ramp layers are also cached and composited in depth order with the moving cars.
Actual steering, pitch, roll, shadows and pipe occlusion remain visible on a
compact race-scale buggy. The detailed car artwork is used only in the gallery.
The 500 Hz simulation, collision response and controller mapping are unchanged.

The editor is removed from shipped code. Saved browser drafts and previous world
preferences are left untouched, but are not loaded by this version. Version 19
and Git commit 9d6871448382410cdf264bde25b217bb7fb6f19e retain the previous scene.

SEASONAL TRACK HANDOFF
Supply one clear overhead drawing, preferably square to the page, with:
- Overall width/depth or one known dimension; a grid is helpful but optional.
- The actual pipe lines, including open divider ends and shared single pipes.
- A driving-direction arrow and start/finish line.
- Jump positions, travel direction, type (single/double/tabletop), and intended
  height or relative size when known.
- Surface type and any banked corners or elevation changes.

Implementation workflow: trace the real pipe boundaries first, compare an
overhead preview against the drawing, then add the timing route and terrain.
Validate the lap order, lane clearance, barrier collisions and jump sequence;
check performance and all camera views before publishing. A centerline alone
is not enough to reproduce tight shared-pipe sections. No editor is required.

Performance checks should compare the same course, camera, viewport, device and
browser. Measure cold cache construction separately from warmed moving frames.
Canvas draw-call time is CPU submission cost, not end-to-end frame or input
latency. Keep physical transmitter feedback as the final driving-feel check.

Measured locally in the Codex in-app browser on 2026-10-19, 960x600 CSS pixels,
DPR2, trackside view, one moving car, 120 warmed frames after 15 warm-ups:
                         v19 mean draw time     minimal mean draw time
 Tacoma Club             14.93 ms               0.94 ms
 Park Classic            32.59 ms               0.76 ms
This isolates rendering; it does not run the full input/physics/audio loop or
measure transmitter latency. Cold first draws were 70.1/102.6 ms before and
41.6/74.0 ms after. The minimal version caps its backing store at 4 million
pixels to bound cache memory on large displays. These results are one-machine
measurements, not a guarantee across browsers or hardware.

INDOOR REFERENCE — OCTOBER 2026
Tacoma Indoor · Layout 01 interprets the owner's rough sketch as measured PVC
layout. The floor is 90 × 60 ft (27.432 × 18.288 m), exactly 5,400 sq ft.
Straight lane boundaries are parallel and 10 ft (3.048 m) apart, measured
between pipe centres. Matched circular elbows connect the runs, keeping the
same lane spacing through turns. Shared spans are merged into a single pipe.
The closed lap guide is about 130 m long.

Clockwise from the upper-right start: right outer straight, bottom triple,
inner-right hairpin, single, upper interior, diagonal triple, lower-left
double, left hairpin, diagonal double, bumps, then the top straight.
The bottom triple is now 7.5 m long (previously 6.2 m), and the diagonal triple
is 7.2 m (previously 5.8 m). Two doubles, one single and four low bumps remain.
Jump heights are initial estimates (7.5 cm bumps, 28–36 cm race crests).

Regular clay handling coefficients and all existing car physics are unchanged.
The circuit uses cached artwork and compact moving cars. The PVC graph is
constructed once at catalogue load, not during rendering or simulation.
Select it in Pit menu > Garage > Browse tracks. Existing tracks remain intact.
Authored pipe collisions follow the visible boundaries; online validation
retains floor bounds and the existing lap-order/speed rules.

 game/indoor-track.js: measured runs, elbows, shared pipes and jump profiles.
 indoor-track-checks.mjs: exact parallel spacing, full-route clearance,
 jump footprints, contacts, scale, showcase lap and camera-fit checks.

TACOMA INDOOR DEFAULTS — LAYOUT 02
The two owner-drawn indoor circuits are now Tacoma Indoor · Layout 01 and
Tacoma Indoor · Layout 02. Only these two appear in Featured, with Layout 02
first. Layout 02 is the landing display and fresh-session default; an existing
valid saved driving selection is still respected. Other active courses remain
available under All tracks. Old course IDs and indices remain stable.

Layout 02 uses the same 90 × 60 ft floor and exact 10 ft pipe-centre spacing.
Following the sketch: front straight west, lower-left S turns, a corner
washboard, top triple then double, central return, step-up east, right double
north, and a small bump on the outer-right return. Lap length is about 138 m.
The top triple is 7.5 m; its following double is 4.3 m. The step-up has a lower
takeoff and raised landing deck. Four separated 2.5 cm ribs follow the corner's
driven band, leaving flat margins so adjacent ribs do not intersect. All jump
heights remain estimates for driving review, not surveyed Tacoma dimensions.

The measured PVC construction is shared in game/pvc-course.js. Layout 01's
track, physical pipes and jumps are unchanged by that extraction. Layout 02
is in game/tacoma-track.js; tacoma-track-checks.mjs verifies its lane spacing,
full-lap clearance, physical jump shapes, nonoverlapping footprints and views.
Physics coefficients and the cached lightweight rendering remain unchanged.


EASY DRIVE — OCTOBER 2026
Choose Drive, then Easy drive. The buggy steers around the course while you
control its throttle and brake. Hold the on-screen throttle with a mouse or
finger and slide right for more power; begin around halfway. Release to coast,
and hold Brake to slow down. W / Up and S / Down also drive and brake when the
track has keyboard focus. The focused throttle slider supports arrow-key holds.
Space pauses and R resets. Pause and choose Drive with keyboard or a transmitter
to return to manual driving; switching assistance starts a fresh attempt.

Easy drive uses the existing tire, suspension, jump and pipe physics. Its gentle
motor envelope makes partial throttle useful; it never brakes for a corner or
adds throttle by itself. Full throttle can run wide. Brake does not engage
reverse. If you hold throttle while grounded and stuck for 1.5 seconds, the car
returns to its nearby route position, clears the controls, and invalidates that
lap. Pause, reset, window focus loss and pointer cancellation clear held input.

Assisted personal bests and ghosts use their own browser records. They do not
replace manual records and cannot be submitted to the manual online lap board.
Home base and account sync include manual driving only. Assisted records stay
in Practice. Manual leaderboard ghosts are hidden during Easy drive. Car setups and saved
transmitter calibration are retained. Separate gamepad onboarding is future work.

 game/easy-drive.js: route steering and gentle human-controlled motor envelope.
 game/easy-controls.js and easy-drive.css: spring-return mouse/touch throttle.
 easy-drive-checks.mjs, easy-controls-checks.mjs, easy-flow-checks.mjs: numerical
 laps, input lifecycle and real-app integration checks.
