oneshotlm
Compare all models on this prompt →

Dangerous Dave platformer · glm-5.3

Output generated Cost / run $0.0364 Runtime 68.8s

Prompt for this run

Build a playable tile-based platformer on a canvas in the Dangerous Dave style: navigate a level to grab a trophy and then reach the exit, avoiding hazards like fire and water, with jumping and simple enemies. Procedural graphics only, no external assets.

⛨ sandboxed Open in new tab ↗

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelglm-5.3
vendorZ.ai · GLM
harnesspi-agent
generated2026-08-27

METRICS

runtime68.8s
tokens in16k
tokens out5.8k
cached9.9k
cost / run$0.0364
Transcript · 6 messages
user

Build a playable tile-based platformer on a canvas in the Dangerous Dave style: navigate a level to grab a trophy and then reach the exit, avoiding hazards like fire and water, with jumping and simple enemies. Procedural graphics only, no external assets.

assistant
thinking
Build a single-file HTML5 canvas platformer. Let me write a solid implementation: tile map, player physics, fire/water hazards, enemies (patrolling), trophy pickup then exit door, jetpack-less, lives, camera if wider level. Keep it moderate but polished.

Design: tile size 32, level ~ 40x14. Draw procedural tiles (brick, grass, water animated, fire animated, trophy, door, enemy sprite). Player: run/jump animation drawn procedurally.

Let me write the code carefully.
→ write index.html (14588 bytes)
toolResult

Successfully wrote 14588 bytes to index.html

assistant
thinking
Verify quickly with node? It's browser code; a quick syntax sanity check via node parse of the script could help but not essential. Just confirm file exists.
→ bash {"command":"ls -la index.html && node -e \"\nconst s=require('fs').readFileSync('index.html','utf8');\nconst m=s.match(/<script>([\\s\\S]*)<
toolResult

-rw-r--r-- 1 node node 14610 Aug 27 00:51 index.html JS parses OK

assistant

Done! `index.html` contains a complete Dangerous Dave–style platformer, all in one self-contained file with zero external assets. **Gameplay:** - Move with **←/→ or A/D**, jump with **Space/↑/W**; **R** restarts - Grab the **trophy** (score +500), then the **door unlocks** — reach it to win (+1000) - Hazards: animated **fire** and **water** tiles kill you; 3 lives, with a death spin animation - **Spiky purple slime enemies** patrol platforms and turn at walls/ledges — stomp them from above (+200) or avoid them **Tech details:** - Tile-based level map (40×14) with AABB collision resolution, gravity, and smooth scrolling camera - Side-scroller parallax background: gradient sky, twinkling stars, layered hills, moon - All sprites drawn procedurally on canvas: animated flame tongues, rippling water with highlights, bobbing golden trophy with sparkle, arched exit door that glows when unlocked, walking player with animated legs, hop-animated enemies - HUD with score, hearts, and trophy status; on-canvas message overlays