Asteroids · qwen3.8-27b
Build a playable Asteroids game on a canvas: a thrust-and-rotate vector ship that shoots and wraps around the screen edges, splitting asteroids into smaller pieces, with score and lives. Procedural vector graphics only, no external assets.
transcript · 6 messages
Build a playable Asteroids game on a canvas: a thrust-and-rotate vector ship that shoots and wraps around the screen edges, splitting asteroids into smaller pieces, with score and lives. Procedural vector graphics only, no external assets.
thinking
Let's write an index.html containing an Asteroids game.
/tmp/ws/index.html (12603 bytes)Successfully wrote 12603 bytes to /tmp/ws/index.html
thinking
Confirming the existence of the file, and probably doing a simple syntax check with node.
{"command":"cd /tmp/ws && node -e \"const s=require('fs').readFileSync('index.html','utf8');const m=s.match(/<script>([\\s\\S]*)<\\/script>/JS OK, file 12611 bytes
thinking
Wait — I wrote 12603 bytes, but stat shows 12611? Probably a slight difference due to the write timing. Whatever, the JS parses successfully.
Done — `/tmp/ws/index.html` is a complete, self-contained Asteroids game (JS syntax verified, no external resources). **Features:** - **Vector ship** — rotate (←/→ or A/D), thrust (↑/W) with animated flame + exhaust particles, inertia with slight drag, screen-edge wrapping, and a blinking spawn-protection period - **Shooting** — Space fires bullets inheriting ship velocity, with cooldown and lifetime; bullets wrap too - **Asteroids** — procedurally generated jagged outlines (10–14 randomized vertices each), tumbling rotation, three sizes that split big → medium → small (100/50/20 points), spawning away from the ship - **Score & lives** — HUD with score counter and life pips; respawn between deaths, game-over screen with Enter to restart - **Polish** — radial-gradient background with deterministic starfield, particle explosions, screen shake, escalating waves ("WAVE N" banner), pause with P, title screen with instructions
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
EVALUATION
Vector Asteroids game with ship, polygon asteroids, score/lives; menu unaffected by mouse but Enter/arrows/WASD start and control gameplay.
Vision grade · anthropic/claude-sonnet-5
MEASUREMENTS
Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.