Commit Graph

8 Commits

Author SHA1 Message Date
dejvino
764ea12a3f Make a serious crash nearly the end of the car
The first calibration left an 85 km/h head-on at 65% chassis and
perfectly driveable, which made hitting a building at ninety an
inconvenience rather than a disaster. The reference crash now lands the
chassis at 23%, the tyres at 61% and the engine at 75% - ordered by
what a collision actually ruins.

That makes one crash survivable and two in a row the end of the car,
which is the shape the risk wants: a mistake you drive home from, and a
second mistake you do not.

The per-step cap moves up with it. It exists for the pathological case
- a car wedged between two colliders reporting forces in the billions -
and once it sits below a bad head-on it stops being a backstop and
becomes the number deciding every impact.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 07:48:37 +02:00
dejvino
d19ce2821f Cut baseline wear to something the parts economy can pay for
Tyres shed 8e-5 per metre, so twelve kilometres of clean driving - no
crashes at all - took them from new to ruined. A two-kilometre round
trip paid ~0.3 parts against ~0.24 of condition spent: driving
perfectly barely broke even, and any knock put you permanently behind.
That is not a decision about how hard to push the car, it is a decline
with no way to arrest it.

At a quarter of the old rates the same trip spends about 0.06, so
roughly two clean runs pay for one bad crash. Enough slack to gamble
with, not enough to ignore.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 07:08:30 +02:00
dejvino
84ee726a51 Calibrate crash damage against forces Rapier actually reports
The impact coefficients in applyWear were written against an imagined
scale. Measured on the running game, a head-on into a building at
85 km/h comes back as a single contact event of ~2.5e6 N — 25 units of
"impact" against the old 1e5 reference. Through the old coefficients
that was 123% of the chassis and 37% of its ceiling, gone, in one hit,
in a game whose missions pay about 0.3 parts each. One crash ended the
campaign, and the campaign had no way to end.

Anchor the reference to the measured figure instead, and cap what any
single step can take: a crash is a pile of contacts across several
steps plus whatever the car scrapes on the way to a standstill, and
that sum has no natural bound.

The same 14-second flat-out run into a building now costs chassis
100 -> 65% and its ceiling 100 -> 89%. Expensive, survivable, and
still the worst thing that can happen to the car.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 07:07:32 +02:00
dejvino
9eaa05d7ef Districts that remember you, and roads worth staying on
Area heat. Road heat alone rewarded a strange kind of play: work one part of
town hard but take a different street every time, and nothing ever got hot. A
second, coarser pool now accrues from being inside a district at all — on-road
or off — and bleeds into every road running through it, including ones never
driven. Deliberately capped below the barricade threshold: a hot district gets
roads patrolled, but concrete still takes somebody actually using that road. It
also decays slower than road heat, because one patrol re-secures a road while a
district's reputation lingers.

Surfaces. Off the route the car now makes about 40% of its road top speed, loses
grip and scrubs momentum in a fifth of the distance, so the road hierarchy is
something you feel rather than something the map merely claims. A first tuning
made off-road a 12 km/h crawl, which removed the choice instead of pricing it —
going round a checkpoint cross-country has to stay a legitimate move.

Speed. Heat scales with how fast you were going, not just how far, and stops
rewarding ever-higher speed past a point so the answer is never one exact number
on the clock. With the road classes, that makes the routing decision real: the
trunk fast and noticed, or the lanes slow and ignored.

Save format goes to v2 for the district pool; older saves are refused rather
than half-restored. Also fixes a population test that hardcoded densities since
tuned, and README claims about patrols and AI that Phase 6 made untrue.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 12:06:59 +02:00
dejvino
9ae00dc978 Sharper steering, solid traffic, and a map that is mostly war
Steering. The falloff with speed was linear, so the car had already lost a third
of its lock by 20km/h — exactly the speed you take a right-angle junction at, on
a map made of right-angle junctions. It is quadratic now, which leaves low
speeds nearly untouched and still calms things down at pace, plus a faster rack
and a little more lock. Pinned with a test that drives an actual quarter turn and
measures its radius. A first attempt asserted that fast corners take longer,
which is simply false: a fast car swings through ninety degrees quicker, just
across far more tarmac. Radius is what a corner costs you.

Contact. Units were points that ignored everything, so there was nothing to hit.
Vehicles now carry kinematic bodies and ramming one is a real collision that
damages them and shoves you. People get no collider on purpose — a capsule means
snagging on pedestrians or launching them — so you drive through them and they go
down, and running over a civilian is counted for later.

Territory. Liberated ground covered more than half the map because the player
started in the middle of it, so most of the world was safe by geometry. The
starting base is now at the friendly edge and the bands are anchored to give
roughly 15/25/27/33 across liberated, contested, occupied and frontier. Measured
in the running game rather than guessed, since the axis runs diagonally across a
square and area is not linear in depth.

Also fixes a fragile test that compared reward rates across whichever targets a
board happened to offer, and so mostly measured route length rather than the
novelty premium it claimed to check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 21:42:17 +02:00
dejvino
90dc18fd17 Braking, stutter, a real road hierarchy, denser towns, and autosave
Braking. Rapier brake impulses were far too small next to a 1100kg chassis, so
the car would not come to a standstill. Raised, plus a coast brake so lifting
off actually slows you and a hold below walking pace so "stop the car" for a
mission is not a fight. First attempt overshot to 1.9g, which reads as hitting a
wall; tuned to about 0.8g, ~25m from 70km/h, and pinned with tests that assert
both an upper and a lower bound on stopping distance.

Stutter. The render drew the raw latest physics transform, so frames that
consumed two steps or none landed as visible jitter at speed. Now interpolated
between the last two steps by the leftover accumulator. Buildings moved into one
instanced draw call and the minimap dropped to 10Hz, both of which were wasted
work in a frame budget that also has to fit a shadow pass.

Roads. Three classes: single-track lanes, two-lane roads, four-lane trunks that
cross the whole map and are never thinned away. Class drives width, the route
corridor, barricade span, map line weight, surface colour, and two things that
matter more: routing is now by travel time so journeys prefer trunks, and
attention scales with class, so a farm track is slow and unwatched while a trunk
is fast and the first place anyone looks.

Towns. Buildings were small and sparse enough to drive around freely. They are
now laid out on a jittered lattice — rejection sampling cannot pack boxes and
saturated at a third of the target — which takes bypass lanes around a barricade
from 0% obstructed to about two thirds. World scaled to 400m half-extent, 81
junctions, 107 roads.

Autosave. Every 20 seconds, plus an immediate checkpoint on taking and
completing a job. Saves carry the subsystem ceilings, what the player knew
including the parts that are now wrong, and where the war had got to. A save is
validated against seed, format version and array lengths before anything is
applied: half-restoring a campaign is worse than starting a fresh one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 13:28:15 +02:00
dejvino
73e8ac68f1 Phase 2: bases, quest board, and known-vs-new targets
Four allied bases, placed by greedy farthest-point so no choke point can strand
the player, with the first at the spawn junction so the loop is available at
once. Missions hand in at any base, not the issuing one.

The board offers known and new targets side by side and describes each route in
words. Crucially it never reads heat directly — it reads sim/intel.ts, a record
of what the player has actually observed and when. Notes age while roads keep
escalating unwatched, so a known route is knowable, stale, and never a promise.
Recon missions survey everything within 130m, which is how a new target becomes
a known one without driving every road there.

New targets pay 1.8x. That multiplier is the phase's tuning dial: too low and
nobody takes the unknown, too high and nobody takes the known.

Payment is parts, which repair the car. To keep "decline, not reset" intact,
each subsystem gains a ceiling that falls permanently with damage — repairs
restore up to what the car is still capable of, never to what it was. Without an
economy the board's rewards had no stakes; with one, the risky job is what keeps
the car running a while longer.

Adds Dijkstra over the road graph, taking a cost function so a "safest route"
preview is a small change later.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 10:06:32 +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