Pitwall started as a passion project. I love motorsport, and the longer I watch it, the more I realise how much of it is data. Lap times split into sectors, gaps to the car ahead, how much grip is left in a tyre, which driver brakes latest into Turn 1. The people on the pit wall aren't driving the car. They're reading numbers, making calls, and trusting a driver to do the rest.
I started watching Formula 1 in 2020, and the 2021 title fight between Verstappen and Hamilton hooked me for good, right down to that last lap in Abu Dhabi that people are still arguing about. Since then I've gone down every motorsport rabbit hole I could find: endurance racing, MotoGP, rally. I always come back to F1, though, and if I have the time, I'm watching every session.
That's the part I wanted to build. Not a racing game where you steer, but one where you sit on the pit wall. You design the car, you shape the driver's instincts, you help it learn, and then you watch what it does with all of that. It was also a chance to put the things I care about in one place: simulation, data analysis, machine learning and good interface design.

You Build the Driver, It Drives
A race weekend has four steps, and each one has one job.
Build. You get 24 points for the car (top speed, acceleration, grip, braking) and 24 for your AI driver (aggression, awareness, consistency, adaptability). Your teammate shares your car but has their own personality, so every race comes with a built-in comparison.

Train. Your driver practises. Training tries dozens of small variations of its habits (how early it brakes for each corner, where it places the car, how hard it commits to a pass), keeps the best, and offers you three directions to choose from.
Qualify. One flying lap each, and the whole session plays out live in 3D. Times fill the tower as cars cross the line, and the fastest sector turns purple.

Race. Twenty cars, a standing start, and no steering. You watch from a chase camera, the onboard, the TV feed or a tactical map, and your engineer talks to you on the radio as things happen.

Honest About the "AI"
I was strict about one rule from the start: never fake it. It would be easy to put "neural network" on a loading screen and have the numbers go up regardless. Pitwall doesn't do that.
Under the hood there's a solid baseline driver, plus a small set of 32 adjustable habits on top of it. Training is an evolutionary search: try variations on the same practice runs, keep the winners, repeat. Every candidate races the exact same seeded conditions, so the comparison is about the habits, not luck.
Then comes the part I'm proudest of. The three options you're offered after training are re-tested on races the training never saw. If a change only looked good because of a lucky run, the card says "No improvement found" and keeps your current driver. Every number on those cards (seconds per lap, contacts per race) is measured, not estimated.

The Data Side
Because every race is decided by a seed (same seed, same cars, same result), the simulation is something you can run experiments on. Most of the interesting work in this project wasn't writing features, it was measuring them.
Balancing the cars. I simulated every legal car build (all 633 of them) and found that grip was worth about eight times as much as braking. The best car was a lopsided grip-and-acceleration special, and the lap time gap between best and worst was 10.3 seconds. Reshaping the stat curves so every point is worth roughly the same took that spread to 4.0 seconds, and a balanced car went from ranked 280th to 5th.
Fixing processional racing. The front of the field kept finishing exactly where it started. I added metrics for it (how closely the finishing order matches the grid, how often pole wins), and when the tuning knobs didn't move anything I traced individual cars. In ten races, cars had committed to an overtake 32,356 times and completed 35. The "should I pass?" and "should I keep passing?" checks disagreed, so cars flip-flopped every frame and never got alongside. Fixing that, and two related bugs, doubled the overtakes per race.
Fixing jitter. Cars stuttered under braking. Measuring it showed the driver was flipping between throttle and brake about 4.4 times a second. Giving the pedals a small deadband and a sensible press rate, the way a real foot works, brought it under one, and drawing the cars between simulation ticks smoothed the rest.
Making It Feel Like Race Day
The game looks like a race broadcast because that's how motorsport fans actually watch. There's a compact timing tower on the left, a pit board with your position and gap, and team-radio graphics that pop up when your engineer says something ("Great move on Tanabe at T1!").

There are six circuits, each with its own personality: a harbour street circuit, a hillside rollercoaster, a desert track with kilometre-long straights, a fast forest circuit. You can set the race length anywhere from one lap to fifty, and the car wear scales with it.

After the flag, the race engineer reads back what happened: where you qualified, where you finished, your best and worst sector, the incidents, and what to develop next. The best overtake of the race gets replayed. It isn't a recording, it's the race re-simulated from its seed, so it's the exact moment.

The Technical Bits Worth Knowing
The simulation is pure TypeScript. No rendering code, no Math.random(). Everything runs on a fixed 60 Hz step from a seeded random number generator, which is what makes replays, fair training and the balance experiments possible.
The 3D view only reads. Three.js draws whatever the simulation says and never changes it. The track, kerbs, gravel traps, grandstands, team garages and trees are all generated from the circuit's centreline, with merged and instanced geometry so twenty cars plus scenery stay smooth. It measured a 120 fps median with twenty cars on track, and drops detail automatically on slower machines.
Training runs off the main thread. The search runs in a Web Worker, so the page stays responsive while your driver practises.
Tested like a real product. There are 66 unit and simulation tests (determinism, every stat moving its metric the right way, every circuit being raceable) and 25 end-to-end browser tests that play full weekends on every circuit and fail on any console error.
// Pedals like a foot, not a switch: lift within a small deadband, press at a human rate.
let wantT = 0, wantB = 0;
if (e >= 0) wantT = Math.min(1, e * 0.6);
else if (e < -PEDAL_DEADBAND) wantB = Math.min(1, (-e - PEDAL_DEADBAND) * 0.4);
const press = (cur: number, want: number, up: number) => (want > cur ? Math.min(want, cur + up * DT) : want);
if (wantB > 0) { c.throttle = 0; c.brake = press(c.brake, wantB, 8); }
else { c.brake = 0; c.throttle = press(c.throttle, wantT, 4); }
What I Shipped
Pitwall lives at pitwall.dlmbaccay.com. It runs in your browser with no account; your team is saved on your own device.
The stack in full: TypeScript, React, Three.js, Vite, Web Workers, Vitest and Playwright.
It's a game about the moment the lights go out and there's nothing left for you to do but watch. If you love motorsport and spreadsheets in roughly equal measure, you'll know exactly why I built it.
Six years of shouting strategy at drivers through a TV screen, and I finally built one that listens. Mostly.