oneshotlm
Compare all models on this prompt →

Space Invaders · gpt-3.5-turbo

Output generated Cost / run $0.0031 Runtime 7.4s

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-3.5-turbo
vendorOpenAI
harnesspi-agent
generated2026-08-01

METRICS

runtime7.4s
tokens in4.4k
tokens out613
cached0
cost / run$0.0031
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

I will start by creating the HTML structure with a canvas element for the Space Invaders game. Let's proceed step by step to complete the game.

→ write index.html (592 bytes)
toolResult

Successfully wrote 592 bytes to index.html

assistant

The HTML structure for the Space Invaders game has been set up with a canvas element. Now, I will proceed with implementing the game logic in the JavaScript code. Let's continue with that.

→ write index.html (678 bytes)
toolResult

Successfully wrote 678 bytes to index.html

assistant

The JavaScript code section has been added to the index.html file. Now, I will continue with implementing the game logic for the Space Invaders game within the JavaScript section. Let's proceed with that. To build the Space Invaders game, we need to implement various components such as the player cannon, aliens, bunkers, score, and lives. Let's start with setting up the basic game loop and initializing the game elements.