oneshotlm
Compare all models on this prompt →

Space Invaders · grok-4.6

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
The user wants me to build a complete Space Invaders game as a single self-contained HTML file. Let me plan this out thoroughly and create a polished, playable game.

I'll build a complete, self-contained Space Invaders game with procedural canvas graphics, bunkers, scoring, and lives.

write /tmp/ws/index.html (27465 bytes)
toolResult

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

assistant
thinking
The file was written successfully. Let me verify it exists and is complete. The user asked for a single self-contained index.html with a playable Space Invaders game. I've created that. Let me do a qu...

The game is in `index.html`. Quick check that the file is in place and complete.

bash {"command":"ls -la /tmp/ws/index.html && wc -l /tmp/ws/index.html"}
toolResult

-rw-r--r--. 1 node node 27469 Aug 13 01:35 /tmp/ws/index.html 986 /tmp/ws/index.html

assistant
thinking
The file is present and complete. I've built a full Space Invaders game. Let me summarize for the user.

`index.html` is a self-contained Space Invaders game (procedural pixels only, no network). **Play:** Enter to start · ←/→ or A/D to move · Space/W to fire · P to pause **Included** - Cannon that moves and shoots (one shot on screen) - 11×5 alien grid that marches, drops, speeds up as ranks thin, and fires from the lowest invader in a column - Four destructible bunkers (cell-based craters from both sides) - Mystery UFO with random bonus points - Score, high score (saved locally), lives, waves - Title, pause, wave, and game-over screens - Tiny square-wave SFX via the Web Audio API (no assets)

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

modelgrok-4.6
vendorxAI · Grok
harnesspi-agent
generated2026-08-13

EVALUATION

4/5 working

Functional Space Invaders with start menu, aliens, bunkers, player ship, scoring; keyboard input starts and controls the game.

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 motion1.0%
on click1.4%
on drag1.9%
on wheel1.4%
on enter + space9.7%
on arrow keys9.0%
on w/a/s/d7.3%
frame spread25 / 255
console errors0
js errors none

METRICS

runtime109.2s
tokens in25k
tokens out10k
cached12k
cost / run$0.0938