oneshotlm
Compare all models on this prompt →

Space Invaders · qwen3.6-flash

Output generated Cost / run $0.0115 Runtime 46.6s

Prompt for this run

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 ↗

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.6-flash
vendorQwen
harnesspi-agent
generated2026-08-01

METRICS

runtime46.6s
tokens in11k
tokens out8.4k
cached0
cost / run$0.0115
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. Let me build a full-featured implementation with:

1. Player cannon - moves left/right, shoots
2. Grid of aliens that descend and advance
3. Aliens fire back
4. Destructible bunkers/shields
5. Score tracking
6. Lives system
7. Procedural pixel-art style graphics on canvas

Let me write this comprehensively.
→ write /tmp/ws/index.html (20423 bytes)
toolResult

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

assistant
thinking
The user asked for a playable Space Invaders game with all features:
- Player cannon that moves and shoots
- Descending grid of aliens that advance and fire back
- Destructible bunkers
- Score and lives
- Procedural graphics only, no external assets

I've written a complete single-file HTML game. Let me verify it was written correctly.

Done — `index.html` is ready at `/tmp/ws/index.html`. Here's what's included: **Gameplay:** - **Player cannon** moves left/right (← → or A D) and fires with spacebar - **5 rows × 11 columns** of pixel-art aliens (3 types with different point values: 10–30 pts each) - Aliens march side-to-side, accelerating as you destroy them, and descend when hitting edges - **Aliens shoot back** with zigzagging red bullets, increasing rate per level - **4 destructible bunkers** made of individual segments — bullet impacts spread damage to nearby pieces - **Mystery UFO** flies across the top occasionally for bonus points (50–300) - **Lives system** (3 lives, shown as ship icons), score tracking, and level progression - **High score** saved to localStorage **Visuals (all procedural):** - Animated pixel sprites for 3 alien types + UFO + player ship - Explosion animations with expanding particle effects - Twinkling star field background - Green CRT-style HUD overlay Open `index.html` in any browser to play!