oneshotlm
Compare all models on this prompt →

Asteroids · claude-opus-4.8

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.

⛨ sandboxed Open in new tab ↗
transcript · 8 messages
user

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.

assistant

I'll build a complete Asteroids game in a single self-contained index.html file.

write /workspace/index.html (13899 bytes)
toolResult

Successfully wrote 13899 bytes to /workspace/index.html

assistant
thinking
I'm checking whether reassigning the `update` function after its declaration works in strict mode—it does, since function declarations can be reassigned even in strict mode. Let me run through the syntax to make sure everything checks out.
bash {"command":"cd /workspace && node --check <(sed -n '/<script>/,/<\\/script>/p' index.html | sed '1d;$d') 2>&1 | head; echo \"checked\""}
toolResult

node:fs:441 return binding.readFileUtf8(path, stringToFlags(options.flag)); ^ Error: ENOENT: no such file or directory, open '/proc/19/fd/pipe:[31961]' at Object.readFileSync (node:fs:441:20) at node:internal/main/check_syntax:36:21 { errno: -2, code: 'ENOENT', syscall: 'open', checked

assistant
bash {"command":"cd /workspace && sed -n '/<script>/,/<\\/script>/p' index.html | sed '1d;$d' > /tmp/g.js && node --check /tmp/g.js && echo \"SYN
toolResult

SYNTAX OK

assistant

The game is complete and syntax-checked. `index.html` is a fully self-contained Asteroids game with no external resources. Features implemented: - **Vector ship** with rotate (←/→), thrust (↑) with flame + friction, and screen wrapping - **Shooting** (Space) with cooldown, bullet limit, recoil, and lifetime - **Asteroids** as procedurally generated jagged polygons that split into two smaller pieces when hit (large → medium → small), each drifting and spinning with wraparound - **Score** (100/50/20 by size) and **lives** shown as ship icons, plus best score and level tracking - **Level progression** — clearing all asteroids spawns a harder wave - **Particle explosions** for hits and thrust, spawn invulnerability with blinking, respawn delay - **States**: title screen (with drifting asteroids), playing, pause (P), death respawn, and game over — Enter to start/restart Open `index.html` in a browser and press Enter to play.

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

modelclaude-opus-4.8
vendorAnthropic · Claude
harnesspi-agent
generated2026-07-08

EVALUATION

4/5 working

Menu transitions into gameplay with ship, wrapping asteroids, lives icons, and score; controls respond appropriately.

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.

idle motion3.0%
on click3.5%
on drag3.5%
on wheel3.0%
on enter + space5.3%
on arrow keys2.6%
on w/a/s/d2.4%
frame spread18.2 / 255
console errors0
js errors none

METRICS

runtime82.0s
tokens in22k
tokens out7.7k
cached9.3k
cost / run$0.3049