Skip to content
OthergreenfieldGames

Implement a TrackMania-style time trial racer in TypeScript

Session from agent-traces-flashmania on Hugging Face by jedisct1 · MIT · condensed by Coders Talk

0ssession
0interventions
GOAL

Fully implement the game described in flashmania_description.md — a TrackMania-inspired solo time trial racer — from scratch in TypeScript with Three.js.

  1. Prompt · +0
    Fully implement the game described in flashmania_description.md in TypeScript
  2. Agent did · +0
    Scaffolded Vite/TS project and built core engine: Vector math, input, audio, car physics with 5 surface types, track block types and builder, car mesh.
  3. Agent did · +0
    Built ghost recording/playback system, game state (timer, medals, checkpoints), UI overlay, chase camera, and the main Game class tying everything together plus entry point.
  4. Fail · +0
    npx tsc --noEmit failed with 4 type errors across CarMesh.ts, Game.ts and TrackBuilder.ts (uninitialized property, invalid comparison, mismatched mesh types).
  5. Agent did · +0
    Fixed all type errors (definite assignment, restructured countdown switch case, widened mesh array types), reaching a clean tsc and vite build.
  6. Agent did · +0
    Rewrote track generation using a path-based system for real drivable circuits, tuned car physics (acceleration, drag, grip, steering), fixed ground snapping and out-of-bounds/finish detection, added a third demo track.
  7. Agent did · +0
    Added pitch/roll support to track blocks for banked turns and wallrides, updated collision boxes accordingly, added a wallride section and ground platforms, fixed checkpoint counting bug.
  8. Agent did · +0
    Final polish pass: fixed restart handling, widened querySurface tolerance, verified clean typecheck and build, ran a completion audit mapping every requirement in the description to implemented code before marking all todos done.
  9. Outcome · +0
    Goal marked complete: 14 TypeScript source files, 3 playable tracks (Speed Valley, Beginner's Loop, Ice Mountain), clean tsc and vite production build with no compile errors.
VERDICT

I'd give the agent the full feature list up front, including performance targets, since it ran fully autonomously with no check-ins from me — the whole build/fix/polish loop was self-directed. The thing that actually caught real bugs was making it run tsc and vite build repeatedly and read back the errors; that loop alone found and fixed all four type errors and the countdown logic bug. Next time I'd ask it to smoke-test the game in a headless browser too, since a clean build doesn't guarantee the physics or track collisions actually work as intended.

I tried this · 0

Discussion · 0

How Builds work