oneshotlm
Compare all models on this prompt →

Asteroids · minimax-m2.7

Build a playable Asteroids game on a canvas: a thrust-and-rotate vector ship that shoots and wraps around the screen edges, splitting asteroids into smaller pieces, with score and lives. Procedural vector graphics only, no external assets.

⛨ sandboxed Open in new tab ↗
transcript · 8 messages
user

Build a playable Asteroids game on a canvas: a thrust-and-rotate vector ship that shoots and wraps around the screen edges, splitting asteroids into smaller pieces, with score and lives. Procedural vector graphics only, no external assets.

assistant
thinking
The user wants a classic Asteroids game built as a single HTML file with canvas. Let me create a complete, polished Asteroids game with:

1. A vector ship that can rotate and thrust
2. Shooting mechanics
3. Asteroids that split into smaller pieces
4. Screen wrapping for all objects
5. Score tracking
6. Lives system
7. All procedural graphics (no external assets)

Let me build this step by step in one file.
write /workspace/index.html (22516 bytes)
toolResult

Successfully wrote 22516 bytes to /workspace/index.html

assistant
thinking
I've created a complete Asteroids game. Let me verify it's correct by checking the file exists and looks reasonable.
bash {"command":"wc -l /workspace/index.html && head -5 /workspace/index.html && echo \"---\" && tail -5 /workspace/index.html"}
toolResult

906 /workspace/index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> --- } }); </script> </body> </html>

assistant
thinking
The file was created successfully with 906 lines. Let me also verify the file opens without errors by doing a quick syntax check.
bash {"command":"node -e \"\nconst fs = require('fs');\nconst html = fs.readFileSync('/workspace/index.html', 'utf8');\nconst scriptMatch = html.
toolResult

JS syntax OK — no errors

assistant
thinking
The game is complete. Let me summarize what was built.

**Asteroids is ready at `/workspace/index.html`** — 906 lines, fully self-contained. ### What's in it | Feature | Detail | |---|---| | **Ship** | Vector-drawn triangle with engine flame that flickers; thrust drag & max-speed cap | | **Controls** | Arrow keys or WASD to rotate/thrust; **Space** to shoot; **P** to pause | | **Bullets** | Wrap the screen, fade over ~1.8s lifespan | | **Asteroids** | Procedurally generated irregular polygons (large → 2 medium → 2 small each), rotating and wrapping | | **Scoring** | 20 / 50 / 100 pts per large / medium / small; level-clear bonus | | **Lives** | 3 lives shown as mini ship icons in the HUD; respawn with 3s invincibility | | **Power-ups** | Shield (cyan ring), Rapid Fire, Triple Shot — drop randomly from destroyed asteroids | | **Particles** | Explosion sparks, shield pickups, ship-death burst | | **Star field** | Twinkling background stars | | **Screens** | Title screen → gameplay → pause banner → game over with score | | **Screen shake** | Camera shake on player death | | **Wave system** | Each level adds more asteroids (up to 12) | Open `index.html` in any browser and press **Space** to start.

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

modelminimax-m2.7
vendorMiniMax
harnesspi-agent
generated2026-07-10

EVALUATION

4/5 working

Menu screen leads into a working Asteroids game with ship, thrust arrows, and vector asteroids after key 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.0%
on click0.0%
on drag2.2%
on wheel0.0%
on enter + space4.8%
on arrow keys2.9%
on w/a/s/d2.6%
frame spread19.1 / 255
console errors0
js errors none

METRICS

runtime124.6s
tokens in25k
tokens out7.8k
cached3.3k
cost / run$0.0135