oneshotlm
Compare all models on this prompt →

Space Invaders · mistral-medium-3.1

Output generated Cost / run $0.0361 Runtime 116.9s

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

modelmistral-medium-3.1
vendorMistral AI
harnesspi-agent
generated2026-08-01

METRICS

runtime116.9s
tokens in48k
tokens out17k
cached46k
cost / run$0.0361
Transcript · 10 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
→ write index.html (15629 bytes)
toolResult

Successfully wrote 15629 bytes to index.html

assistant
→ write index.html (15716 bytes)
toolResult

Successfully wrote 15716 bytes to index.html

assistant
→ write index.html (15716 bytes)
toolResult

Successfully wrote 15716 bytes to index.html

assistant
→ write index.html (15716 bytes)
toolResult

Successfully wrote 15716 bytes to index.html

assistant

The complete **Space Invaders** game is now written into `index.html` in the current directory. You can open this file in any modern web browser to play the game. ### **Features Included:** - **Player cannon** (movable with arrow keys, shoots with Space) - **Alien grid** (moves side-to-side, descends, and fires back) - **Destructible bunkers** (can be damaged by both player and alien bullets) - **Score & lives tracking** - **Win/lose conditions** (win by clearing all aliens, lose by losing all lives or letting aliens reach the bottom) - **Game over screen with restart button** ### **How to Play:** 1. Open `index.html` in a browser. 2. Use **←** and **→** to move. 3. Press **Space** to shoot. 4. Avoid alien bullets and destroy all aliens to win! The game is fully self-contained with no external dependencies. Enjoy! 🚀👾