oneshotlm
Compare all models on this prompt →

Space Invaders · qwen3.8-2.4t-a95b

Build a playable Space Invaders game on a canvas: a player cannon that moves and shoots, a descending grid of aliens that advance and fire back, destructible bunkers, score, and lives. Procedural graphics only, no external assets.

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

Build a playable Space Invaders game on a canvas: a player cannon that moves and shoots, a descending grid of aliens that advance and fire back, destructible bunkers, score, and lives. Procedural graphics only, no external assets.

assistant
thinking
Build a complete Space Invaders in a single index.html. Let's write a solid implementation: canvas, player, aliens in a grid (3 types), alien movement + descent + shooting, destructible pixel-based bunkers, score, lives, UFO if possible. Procedural sprites via pixelmaps drawn to canvas. Keyboard controls. Game states: start, playing, game over, win/next wave.

Bunkers: represent each bunker as a small grid of destructible cells. Bullets erode the cells.

Alien animation: 2 frames, toggle. Speed increases as the number decreases.

Let's write it carefully and concisely.
write /tmp/ws/index.html (23808 bytes)
toolResult

Successfully wrote 23808 bytes to /tmp/ws/index.html

assistant
thinking
Quick sanity check: does a JS syntax issue exist? Let's quickly verify with node (extract the script). Also, check for logical issues:
- `drawText('' ...)` inside PLAYER_DYING is a harmless no-op; no problem.
- Aliens only march horizontally while alive; no problem.
- Collisions: player bullets and bunkers — in the classic version, player bullets don't collide with their own bunkers, but blocking both is fine too.
- PLAYER_DYING state: aliens pause (no updateAliens), no problem.

Let's extract the script and verify the syntax with node.

Let me verify the JavaScript has no syntax errors:

bash {"command":"cd /tmp/ws && node -e \"\nconst html = require('fs').readFileSync('index.html','utf8');\nconst m = html.match(/<script>([\\s\\S]
toolResult

JS syntax OK, script length: 22723 -rw-r--r--. 1 node node 23816 Aug 13 01:35 index.html

assistant
thinking
The environment may not have a browser, but a simple smoke test using jsdom isn't necessary. Syntax checking alone is sufficient. Done.

Done — `/tmp/ws/index.html` is a complete, self-contained Space Invaders game. Syntax verified, no external assets or network requests. **Features:** 🎮 **Gameplay** - Player cannon moves with ←/→ or A/D, shoots with Space (2-bullet limit + cooldown, classic style) - 5×11 grid of aliens in 3 types (squid 30pts, crab 20pts, octopus 10pts) that march side-to-side, drop down at the edges, and accelerate as their numbers dwindle - Aliens fire back with zigzag bolts — some aimed at the player - Mystery UFO flies across the top for 50–300 bonus points - 4 destructible bunkers: cell-based erosion with irregular blast craters, eaten from both sides, and wiped out if aliens march over them - Score, hi-score, lives (3), wave counter — waves spawn lower and faster - Win a wave → next wave; lose all lives → game over; aliens reaching the ground = instant loss 🎨 **Procedural graphics only** - All sprites (aliens with 2-frame animation, cannon, UFO) drawn from pixel maps onto the canvas - Particle explosions, twinkling starfield, pulsing UFO glow, floating score popups, retro green CRT-style glow via CSS 🔊 **Procedural audio** — Web Audio API square/sawtooth blips for shooting, kills, the classic marching thump, and explosions (no audio files) **Controls:** Enter to start/restart · Space to shoot · P to pause

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

modelqwen3.8-2.4t-a95b
vendorQwen
harnesspi-agent
generated2026-08-13

EVALUATION

4/5 working

Space Invaders with start menu, alien grid, bunkers, cannon, and shooting all functioning via keyboard input.

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 motion0.5%
on click0.5%
on drag0.5%
on wheel0.5%
on enter + space9.8%
on arrow keys6.0%
on w/a/s/d6.0%
frame spread29.5 / 255
console errors0
js errors none

METRICS

runtime139.9s
tokens in23k
tokens out9.6k
cached0
cost / run$0.1042