Back to Pursuit PIT
SOURCE / PINNED RELEASE

Made of little things.

Pursuit PIT

Release
565f4981bdc3…
Author-recorded commit
197afdbed44b…
License
LICENSE
Author’s source reference
nostr://npub12lm3rxsva8kfempyjkxupt09e02n3fezurkyadyqfejdc5e0r2kscqty6r/wss%3A%2F%2Fgit.napplet.soy%2F/n-951414e7fd7

Archive hash verified: 3b0485589942fd5c…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

tools/topspeed.ts
// Full throttle on an empty highway: how fast does the patrol car get? bun tools/topspeed.ts
import { MPS_TO_MPH, Sim, forwardSpeed } from '../src/game/sim.ts';
const sim = new Sim(0);
sim.cars = [sim.player, sim.suspect];
sim.suspect.s = 1e6; // out of the way
for (let t = 0; t <= 40; t += 1 / 120) {
  sim.step(1 / 120, { throttle: 1, steer: 0 });
  if (Math.abs(t % 5) < 1 / 240) console.log(`${t.toFixed(0)}s: ${(forwardSpeed(sim.player) * MPS_TO_MPH).toFixed(1)} mph`);
}