Commit Graph

3 Commits

Author SHA1 Message Date
dejvino
475db8773c Heat: credit the verge to the road, and block the whole corridor
Driving alongside a road accrued no heat at all, so the dominant strategy was
to never actually use one. Heat is now credited to any road within 12m of the
centreline, tarmac or verge.

The cutoff is hard rather than tapered: a taper leaves a gradient to optimise
along, where sitting at 80% of the catchment costs 20% of the heat. A cliff
edge means you either use the route or genuinely leave it.

12m is a balance, not a guess. It puts ~7.5m of verge past the kerb — two car
widths, so hugging the shoulder gains nothing — while leaving 57% of the map
off-route. At 20m two thirds of the map counts as on-route, heat becomes
unavoidable everywhere, and choosing a different route stops meaning anything.

Barricades now span the full corridor for the same reason. Stopping at the kerb
left them free to round on the verge at speed.

Junction heat is still deferred; a point near a junction is credited to the
nearest segment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 09:41:52 +02:00
dejvino
506d07be5d Phase 1: road network and heat
Roads are a jittered 7x7 grid with ~a quarter of the edges thinned out, kept
connected. The loops are the point: "take a different road" is not a decision
without alternative routes.

Every metre driven adds heat to that segment; all roads shed it slowly. Crossing
a threshold escalates Clear -> Patrol -> Barricade -> Turret, each of which puts
real obstructions on the tarmac. Hysteresis stops a road on a boundary from
rebuilding its barricade every few seconds.

Level changes are deferred while the car is on the segment. Building a barricade
around the player would spawn a static collider inside the chassis, and the
player is meant to discover escalation by returning to a road, not by watching
it assemble behind them.

Checkpoint positions are seeded from the segment id, so a stretch of road always
fortifies in the same place — recognising it is part of learning the map.

Scenery now avoids the tarmac and the car spawns at a junction.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 07:47:19 +02:00
dejvino
a66032674d Phase 0: drivable car with persistent wear
Vite + TypeScript + three.js + Rapier raycast vehicle, fixed 60 Hz step.

Flat plate, seeded obstacle scatter, chase camera, debug HUD. Car condition
(engine/tires/chassis) degrades permanently and is derived into handling
numbers, so decline is felt through the wheel rather than read off a meter.

src/sim/ is kept free of three.js and Rapier imports — the later heat, region
and front-line systems all live there, and staying engine-free is what makes
them unit-testable without a browser.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 07:39:05 +02:00