oneshotlm
Compare all models on this prompt →

Space Invaders · gpt-4.1-mini

Output generated Cost / run $0.0095 Runtime 57.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

modelgpt-4.1-mini
vendorOpenAI
harnesspi-agent
generated2026-08-01

METRICS

runtime57.6s
tokens in6.5k
tokens out4.3k
cached0
cost / run$0.0095
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

Creating a fully playable Space Invaders game in a single HTML file with canvas, procedural graphics (no external assets), and all the features you requested (player cannon that moves and shoots, descending grid of aliens that advance and fire back, destructible bunkers, score, and lives). I'll include all CSS and JS inline for simplicity. Let's build it step by step and then write it all into one self-contained index.html file. I'll deliver the entire file in the next response.

→ write index.html (12178 bytes)
toolResult

Successfully wrote 12178 bytes to index.html

assistant

I have created a fully playable Space Invaders game in a single self-contained file named index.html. It features: - A player cannon that moves left/right and shoots. - A grid of aliens that descend and move sideways, shooting back. - Destructible bunkers protecting the player. - Score and lives display. - Procedural graphics only, no external assets. - Press R to restart after game over or win. Open the index.html in a modern browser to play. Let me know if you'd like me to explain the code or add features!