oneshotlm
Compare all models on this prompt →

Space Invaders · qwen3.7-plus

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 · 4 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 a complete Space Invaders game in a single HTML file with procedural graphics. Let me plan out the key features:

1. Player cannon - moves left/right with arrow keys, shoots with space
2. Grid of aliens - descending and advancing, moving side to side and dropping down
3. Player bullets and alien bullets
4. Destructible bunkers - pixel-based destruction
5. Score tracking
6. Lives system
7. Game over / restart

I'll use a canvas element with all rendering done procedurally. Let me design this carefully:

- Canvas size: ~800x600
- Player: triangular cannon shape at bottom
- Aliens: 5 rows x 11 columns grid, different types per row drawn procedurally
- Bunkers: 4 bunkers made of small blocks that can be individually destroyed
- Sound: I'll skip audio since no external assets and procedural audio can be complex, but I could add simple oscillator sounds

Let me write this as a complete, polished game.
write /workspace/index.html (21261 bytes)
toolResult

Successfully wrote 21261 bytes to /workspace/index.html

assistant
thinking
The file is written. Let me verify it's there and well-formed.

The game is ready at `/workspace/index.html`. Here's what's included: **Gameplay:** - **Player cannon** at the bottom — move with ← → (or A/D), shoot with Space - **5 rows × 11 columns of aliens** that march side-to-side and drop downward, speeding up as fewer remain - **3 alien types** with distinct pixel-art sprites (squid, crab, octopus) worth 30/20/10 points - **4 destructible bunkers** made of individual blocks that chip away from both player and alien fire - **Bonus UFO** that flies across the top periodically for mystery points (50–300) - **Lives system** (3 lives) with invincibility blinking after getting hit - **Progressive levels** — when all aliens are destroyed, a new wave starts faster - **Score + Hi-Score tracking** **Visual/Audio:** - All procedural graphics — pixel-art aliens with 2-frame animation, tank-style player cannon, zigzag alien bullets - Particle explosion effects on kills - Starfield background with subtle twinkling - Procedural sound effects (shooting, explosions, alien march) via Web Audio API **Controls:** - ← → / A D — Move - Space — Shoot - P — Pause - Enter — Start/Restart

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.7-plus
vendorQwen
harnesspi-agent
generated2026-07-22

EVALUATION

4/5 working

Space Invaders starts via Enter, shows alien grid, bunkers, lives, and responds to arrow/WASD movement; mouse inputs correctly ignored.

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.0%
on click0.0%
on drag0.0%
on wheel0.0%
on enter + space12.5%
on arrow keys7.8%
on w/a/s/d8.2%
frame spread42.5 / 255
console errors0
js errors none

METRICS

runtime168.2s
tokens in12k
tokens out8.9k
cached0
cost / run$0.0152