On Track Math

A 3D maths racing game for kids

LiveSep 2026 to nowPlay it

  • 24lessons
  • 72stars to earn
  • 9cars
  • 577commits
Mid-race on the beach track: the question 2 x 8 above two answer gates and a Got it banner as the car smashes through the right one

About

On Track Math is a racing game for young children learning arithmetic. A sum appears, the road splits into gates, and you steer through the one with the right answer.

There are four worlds, 24 lessons, 72 stars to earn and nine cars to unlock. It runs in the browser with no account, and keeps progress on the device.

Stack

Game
ReactTypeScriptVitethree.jsreact-three-fiber
Sound
Web Audio, all synthesised
Hosting
Cloudflare Workers
Testing
VitestPlaywright visual tests

Technical challenges

  • Gates that don't give the answer away

    Every problem and every gate is worked out in advance, about 8,000 problems, so each number on the board is the right answer exactly a third of the time. You can't win by learning which numbers usually come up.

  • Three ways to play

    Learn waits for you. Practice gives 15 seconds a gate and three hearts. Race gives nine seconds, a clock sized to the hardest lesson so it stays fair everywhere.

  • 3D that doesn't leak

    A car that didn't free its geometry leaked 18 objects on the graphics card every time you browsed the showroom. Disposal is now tracked, and a check makes sure the counts stay flat.

  • Music with no audio files

    Every sound effect and a song for each world is synthesised in the browser, on a scheduler that looks a fraction of a second ahead so nothing stutters.

  • Progress that survives private browsing

    Runs are saved as an append-only history on the device, written to cope with the storage errors private browsing throws.

  • Testing a 3D game

    A frozen clock makes every frame repeatable for screenshot tests, and a fuzz test throws random play at the simulation.

Gallery

The island map seen from above with four winding trails: Addition Peaks, Division Canyon, Multiplication Beach and Subtraction Depths
The finish-line party on the beach: a bonfire under a lighthouse, crabs, a dog and a bird DJ, and a banner saying You did it with two stars
The results card: Practice cleared, two of three stars, 8 of 8 gates for 136 points