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>
This commit is contained in:
+5
-2
@@ -97,16 +97,19 @@ export function createMinimap(roads: RoadNetwork, bases: Base[], worldExtent: nu
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(px(s.ax), px(s.az));
|
||||
ctx.lineTo(px(s.bx), px(s.bz));
|
||||
// Line weight follows road class, so the trunk network is the thing you
|
||||
// read first when planning a route.
|
||||
const weight = { trunk: 3, road: 1.8, track: 1 }[s.cls];
|
||||
if (hasSeen(intel, s.id)) {
|
||||
const age = Math.min(1, (view.now - intel.seenAt[s.id]!) / STALE_AFTER);
|
||||
ctx.setLineDash([]);
|
||||
ctx.lineWidth = 2;
|
||||
ctx.lineWidth = weight;
|
||||
ctx.globalAlpha = FRESH_ALPHA + (STALE_ALPHA - FRESH_ALPHA) * age;
|
||||
ctx.strokeStyle = HEAT_COLOURS[intel.rememberedLevel[s.id]!];
|
||||
} else {
|
||||
// Known to exist, nothing known about it.
|
||||
ctx.setLineDash([2, 3]);
|
||||
ctx.lineWidth = 1;
|
||||
ctx.lineWidth = weight * 0.6;
|
||||
ctx.globalAlpha = 1;
|
||||
ctx.strokeStyle = '#3c464f';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user