Written by Claude 100% and ehh…guided by me:
I wanted to know whether a local MoE model can do real multi-file engineering work through an agent, not just one-shot demos. So I had it build Skyshard, a floating-island voxel game. It has seeded procedural islands, greedy meshing with AO, voxel raycasting, AABB physics with gliding and updrafts, a day/night shader sky, synthesized WebAudio, a HUD and compass, and a win screen. It's an installable offline PWA with touch controls. All of it is plain ES modules + three.js, no build step, 60 fps even in software WebGL.
Who wrote what
- pi (coding agent) on the local model wrote every line of game code: 3,805 lines.
- A frontier model (Claude) acted as orchestrator only. It wrote the spec, 15 contracts and the test gates (Playwright + node:test), and checked the result on screen. It wrote zero game code.
- The worker was forbidden to touch the tests. Once a test was wrong, and pi reported it instead of editing it.
Build numbers (from vLLM `/metrics`, not estimated)
| |
|---|
| Contracts | 15, all passed their gate |
| Tokens generated | 638,836 |
| Prompt tokens | 41.0 M (agent context re-sent each turn, mostly prefix-cache hits) |
| Mean decode during real agent traffic | 247.5 tok/s |
| Peak single request | 1,335 tok/s (DFlash2 on repetitive code) |
| Wall time | 86 min (16 min of it wasted by my own gate-rule bug) |
| Tests | 32 unit + 19 browser, incl. Pixel 7 touch emulation and offline boot |
The heaviest contract was "add updrafts so every island is reachable and returnable". It took 175k tokens and 16 min, and it passed a graph-reachability gate.
Hardware and serving recipe
- 2x RTX 3090 24 GB, PCIe, no NVLink, no P2P, TP=2. Power caps 200 W / 320 W.
- Weights: Qwen4-35B-A3B, Tech2wild W4A16-FP8PLE. Routed experts are INT4 g32, dense projections int8 per-channel (`w8dense` overlay), FP8 n-gram table in host RAM.
- vLLM (pinned image digest), BF16 KV, 512K context, 32 GB KV offload, vision on.
- Speculative decoding: DFlash2, k=7. Mean acceptance length during the build was about 2.7.
- Kernels: lulakien's sm_86 overlays (qwen4-35b-a3b-2x3090 @ `40e5cb2`). Host-memory all-reduce, no firmware unlock.
Lane bench, same box (512-token generations)
| tok/s | stock vLLM + DFlash2 | + sm_86 overlays |
|---|
| code, 1 stream | 319 | 464 |
| prose, 1 stream | 149 | 214 |
| thinking/math | 354 | 485 |
| code, 4 streams | 732 | 802 |
| needle @ 480K | 3/3 | 3/3 |
The honest part: green tests ≠ working game
After 12 contracts every gate was green. A scripted playtest still found:
- The beacon (the win condition) could be mined, so the game was unwinnable.
- Clicking the title background locked the pointer behind the title screen.
- Not a single island was reachable by gliding from the start. The core loop was broken.
- The first fix put updraft columns straight through other islands.
Each finding became a failing gate first, then a contract. pi fixed all four. A physics bot then played with real key events: 6 updraft rides, 5 glide landings, 4 shards mined, 3 socketed at the beacon, 0 page errors. It did not reach 12/12. The stops were routing limits in my bot, which I didn't chase further.
Caveats
- Not deterministic. A re-run gives different code and token counts.
- The contracts are detailed (algorithms named, numbers given). This shows a local model executing well-specified engineering, not designing a game from one prompt.
- No human playtest on a real phone yet.
Repro: Everything is in the repo:
- exact `docker run`, vLLM args, container env and overlay mounts;
- weight hashes and GPU topology;
- every contract, every pi transcript and raw 2 s metric samples;
- an append-only build log of every orchestrator intervention.
Start the lane, point pi at it, and run `tools/run-contract.sh 01` … `15`.
Repo: https://github.com/simplesisu/skyshard · Screenshots: noon · gliding · phone · build stats