Skip to content

feat(tracks): narrow Monarch toward Monaco's road at the hairpin and Rascasse - #361

Merged
khiet merged 4 commits into
mainfrom
feat/360-monarch-road-width
Nov 10, 2026
Merged

khiet merged 4 commits into
mainfrom
feat/360-monarch-road-width

Conversation

@khiet

@khiet khiet commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

Monarch's road narrows toward Monaco's own at the hairpin and Rascasse. The sim reads only the sidecar and the glTF, so only the track generator changed.

Layout.half_width_at(s)
  inside a Taper  -> linear from the width before it to the width after it
  else            -> half_widths[segment] or asphalt_half_width
Monarch (full width) before after
Mirabeau, kink, hairpin approach and exit, Rascasse 12 m 9 m
Grand Hotel hairpin 12 m 8 m
Mirabeau Bas (the bot gate widened it from 9 m) 12 m 10 m
Everywhere else 12 m 12 m

Every taper is linear, so the edge never steps:

  • In over the last 15 m of the Casino descent, after the wheel crossing.
  • Out over Portier, so the road is 12 m from the start of the tunnel entry.
  • In over the last 15 m of the quay, after its box row.
  • Out down the Rascasse exit straight, back to 12 m about 30 m before the pit lane's fork.

These all follow the local width: the asphalt, sand, walls (including the pit lane side's), painted kerbs, checkpoints, hoardings, gantry, start line and wheel crossing. A tunnel, bridge, ramp, pit lane or hazard zone needs one width along its whole length, so the export refuses a layout whose width changes under one (refuse_width_changes).

ADR 0106 supersedes ADR 0064's uniform 12 m. The style guide's wall entry and the tracks README are updated.

Evidence

  • Before: at the issue's starting widths (Mirabeau Bas at 9 m), the bot gate in_200_races_of_eight_bots_on_monarch_every_one_finishes_at_every_level failed:
    Basic seed 165: karts [3] never finished
    
    A boosted bot cleared the Mirabeau Bas wall and flew past Portier's checkpoint outside its reach. It was the only failure in 600 races.
    After: with Mirabeau Bas at 10 m (one 0.5 m half-width step), the gate passes all 600 races.
  • test_road_width.py (18 tests) checks:
    • each zone's half width
    • every taper's endpoints
    • no step anywhere round the lap: the steepest change is 0.1 m of half width per metre
    • 12 m from at least 20 m before the pit lane's fork
    • asphalt, checkpoints, kerbs and hoardings at the local width
    • every box, pad, coin and sausage kerb inside it
    • the refusals
  • The wall and checkpoint tests in test_track_limits.py and test_pit_lane.py now read the local width.
  • Test results:
    • pnpm test:tracks: 287 passing
    • cargo nextest run --workspace: 600 passing
    • native and wasm replay tests: passing, after re-recording monarch-lap-with-bots
    • repo-checks: 254 passing
  • pnpm export:tracks changed only Monarch's glb and sidecar.

Merge Danger

Door: two-way

Reverting restores the 12 m road. The replay fixture would need re-recording again.

Blast Radius: Monarch

This changes how Monarch races: tighter corners, and the walls come closer at Mirabeau and Rascasse. Bot finishing times on Monarch will shift. Other courses export unchanged.

…Rascasse

A layout gains per-segment half widths joined by linear tapers, read through
Layout.half_width_at; the asphalt, sand, walls, kerbs, checkpoints and
hoardings follow it, and the export refuses a tunnel, bridge, ramp, pit lane
or hazard zone where the width changes. Monarch runs 9 m from Mirabeau to the
hairpin's exit and at Rascasse, 8 m round the Grand Hotel hairpin and 10 m at
Mirabeau Bas, which the bot gate widened from 9 m. ADR 0106 supersedes ADR
0064's uniform 12 m.

Closes #360
… wall's back

Also documents half_widths and Taper in the tracks README.

Closes #360
@khiet khiet linked an issue Nov 10, 2026 that may be closed by this pull request
@khiet
khiet marked this pull request as ready for review November 10, 2026 12:54
@khiet
khiet enabled auto-merge (squash) November 10, 2026 12:55
@khiet
khiet disabled auto-merge November 10, 2026 12:55
@khiet
khiet enabled auto-merge (squash) November 10, 2026 12:55
@khiet
khiet disabled auto-merge November 10, 2026 12:55
@khiet
khiet merged commit 43e4f97 into main Nov 10, 2026
4 checks passed
@khiet
khiet deleted the feat/360-monarch-road-width branch November 10, 2026 12:55
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.

Monarch: road width per segment, narrowed toward Monaco's

1 participant