Space Invaders · deepseek-v4-flash-0731
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.
transcript · 6 messages
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.
thinking
Let me build a Space Invaders game in a single index.html file with procedural graphics. Let me write it.
/tmp/ws/index.html (27526 bytes)Successfully wrote 27526 bytes to /tmp/ws/index.html
thinking
Let me verify the file exists.
{"command":"cd /tmp/ws && ls -la index.html && node -e \"new (require('vm').Script)(require('fs').readFileSync('index.html','utf8').match(/<-rw-r--r--. 1 node node 27526 Aug 2 03:26 index.html JS syntax OK
Done. `index.html` is a complete, self-contained Space Invaders game. **Features implemented:** - **Player cannon** — moves with arrow keys, shoots with Space, blinks/respawns on hit. - **Grid of aliens** (5 rows × 11 columns, 3 procedurally-drawn sprite types) that march side-to-side, descend at edges, speed up as they're killed, and fire back. - **Destructible bunkers** — cell-based grids that carve out when hit by any bullet. - **Score, hi-score, and lives HUD**, plus bonus points for UFOs and wave-clear bonuses. - **Procedural graphics only** — every sprite (aliens, cannon, UFO, bunkers, explosions, stars) drawn with canvas primitives. No external assets. - **Procedural WebAudio sound** — classic descending alien beeps, shooting, explosions, UFO. **Controls:** ← → move, Space shoot, P pause, R restart, Enter start. All CSS/JS is inline in one file with no network requests, so it runs fully sandboxed. Open `index.html` in a browser 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
EVALUATION
Space Invaders with player ship, bunkers, alien grid, UFO, and game over state respond correctly to 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.