oneshotlm
Compare all models on this prompt →

Space Invaders · qwen3.5-122b-a10b

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 in a single HTML file. This is a classic arcade game with several components:

1. Player cannon that moves left/right and shoots
2. Grid of aliens that move horizontally, descend, and fire back
3. Destructible bunkers (barricades) that get damaged by shots
4. Score tracking
5. Lives system
6. Procedural graphics (no external assets)

Let me create a comprehensive implementation with all these features. I'll need:
- Canvas for rendering
- Game loop with requestAnimationFrame
- Player class with movement and shooting
- Alien grid class with coordinated movement
- Projectile handling for both player and alien shots
- Bunker system with destructible segments
- Collision detection
- Score and lives display
- Game states (playing, game over, win)

Let me write this as a single self-contained HTML file.
write index.html (24277 bytes)
toolResult

Successfully wrote 24277 bytes to index.html

assistant
thinking
I've created a complete Space Invaders game in a single HTML file. Let me verify the file was created correctly.
bash {"command":"ls -la index.html && head -50 index.html"}
toolResult

-rw-r--r--. 1 node node 24277 Aug 1 20:49 index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Space Invaders</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { background: #000; display: flex; justify-content: center; align-items: center; min-height: 100vh; font-family: 'Courier New', monospace; overflow: hidden; } #gameContainer { position: relative; } canvas { display: block; border: 2px solid #0f0; } #ui { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 20px; color: #0f0; font-size: 18px; text-shadow: 0 0 5px #0f0; } #overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); display: flex; flex-direction: column; justify-content: center;

assistant
thinking
The file has been created successfully. Let me provide a summary of what was built.

Space Invaders game created at `/tmp/ws/index.html`. The game includes: **Features:** - **Player cannon** - Move with Arrow Keys or A/D, shoot with SPACE - **Alien grid** - 55 aliens in 3 types (squid=30pts, crab=20pts, octopus=10pts) that descend and fire back - **Destructible bunkers** - 4 barricades that get damaged by any projectile - **Score & High Score** - Persisted to localStorage - **Lives system** - 3 lives with invincibility after being hit - **Level progression** - Aliens speed up each level - **Explosion particles** - Visual feedback for hits - **Animated stars background** - Procedural scrolling effect **Procedural graphics:** - Player ship drawn with rectangles (base, turret, cannon) - Three alien types with animated frames (legs/arms/tentacles move) - Green bunker segments forming arch shapes - Red alien bullets, green player bullets - Particle explosions with fading colors **Game states:** - Start screen with instructions - Playing state with full gameplay - Game over with final score and restart option Open `index.html` in a browser to play. No external resources required.

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.5-122b-a10b
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Full Space Invaders with alien grid, bunkers, cannon, score/lives HUD; starts and responds to keyboard, not pointer 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.2%
on click0.3%
on drag0.3%
on wheel0.1%
on enter + space13.7%
on arrow keys12.1%
on w/a/s/d8.2%
frame spread33.1 / 255
console errors0
js errors none

METRICS

runtime64.5s
tokens in18k
tokens out6.6k
cached0
cost / run$0.0184