Lab

Kid Runner

Three webcam games my daughter plays with her whole body: a runner, a race track and an open island, with the pose model running on the laptop and nothing leaving it.

Status
Live
Year
2026
Built with
TypeScript, Three.js, MediaPipe pose, Cloudflare Pages, D1, Passkeys

What it is

A five-year-old does not want another tapping game. Kid Runner reads the player through the laptop webcam: step left or right to change lanes, jump over logs, duck under bars, put both hands up to grab stars. The camera frames never leave the machine — pose estimation runs in a worker on-device, and there is no video upload, no account needed and no advertising.

It grew into three games on one shell. The runner is the original lane game with challenges a parent can switch on. The race track is a 2.5 km generated circuit driven by holding an invisible steering wheel, with rival cars, traffic and a day-to-night cycle. The island is an open world: chop wood, cook at a campfire, fish, drive a car, paddle a canoe and run errands for the villagers.

Everything a parent needs sits behind one gear icon: a break reminder, a camera nap when nobody is in front of it, an activity report of how long and how actively the child played, and per-game settings so the menu only shows what belongs to the game on screen.

What it does

  • Whole-body input. A gesture engine on top of MediaPipe landmarks detects lane steps, jumps, ducks, hands up, claps, punches, running in place and an invisible steering wheel, each tuned against recorded sessions rather than guessed thresholds.
  • Three games, one shell. The shell owns the renderer, the camera and the single input drain, and hands frames to whichever game is active. A child picks between them by stepping left or right and jumping.
  • An island that keeps its state. A 400 m procedural island with a village, a lake and a mountain: weather spells, a ten-minute day, pets that follow and sniff out buried treasure, a map with a pin you can drop. What you build, plant, harvest and drive is saved every twenty seconds.
  • Plays without hands too. Every game also takes keyboard, mouse or touch, so it works on a phone, with a trackpad, or when the camera is simply not wanted that evening.
  • Cloud save without an account. Progress stays in the browser for guests. A parent can add a passkey — Touch ID, a fingerprint or the device PIN, no email and no password — and the same stars, stickers and island appear on the next device.
  • Built for a parent, not a growth team. A break reminder, a camera nap after idle minutes, an activity report, and a spoken voice line before every move so a child who cannot read yet still knows what is coming.

How it was built

The whole thing was built with Claude Code as the pair: I set the direction, reviewed every diff and played every build; it wrote most of the lines. The repository carries about three hundred node tests over the pure logic — gesture thresholds, physics steps, terrain generation, save migrations — because the fastest way to keep an AI pair honest over a long session is a suite that fails loudly when it drifts.

The discipline that made it work: keep the game logic pure and testable away from Three.js and the DOM, verify in a real browser before every commit rather than trusting the diff, and treat the test run plus a typecheck as the gate on the commit.

It deploys itself — a push to main runs the tests and publishes to Cloudflare Pages. Hosting, database and voice generation together cost nothing a month.

Screenshots

The island: the village square with the star shop, a villager with a job, and the clock showing the island day.
1. The island: the village square with the star shop, a villager with a job, and the clock showing the island day.
The race track at night, on the stunt road: the wheel shows the speed, the callout shows the next turn, and running in place fills the nitro.
2. The race track at night, on the stunt road: the wheel shows the speed, the callout shows the next turn, and running in place fills the nitro.
The runner after dark: step left or right, jump the logs and duck under the bars.
3. The runner after dark: step left or right, jump the logs and duck under the bars.

Questions

Happy to go into how any of this was built:emtiazzahid@gmail.com, orthe contact page.