oneshotlm
Compare all models on this prompt →

Asteroids · qwen3.6-35b-a3b

Output generated Cost / run $0.0047 Runtime 53.6s

Prompt for this run

Build a playable Asteroids-style game on a canvas using procedural vector graphics. Use HTML, CSS, and JavaScript as needed. Write it to `index.html` in the current working directory using your file tools. Inline your own CSS and JavaScript. Do not use external assets, CDNs, or network requests. No third-party libraries are provided. Required behavior: - Use Left/Right to rotate the ship, Up to thrust, and Space to fire. Show the controls. The ship retains momentum and wraps around every screen edge; asteroids also wrap. - Spawn moving large asteroids. A bullet hit splits a large asteroid into smaller pieces; hitting a smallest piece removes it. Hits increase the score. - Start with three lives. A ship-asteroid collision removes one life, respawns the ship, and briefly protects it from immediate repeated damage. - Clearing all asteroids starts another wave. Losing all lives shows Game Over and a Restart control that resets score, lives, and the arena. - Keep projectile lifetime bounded and prevent gameplay keys from scrolling the page. Verify: Test rotation, thrust, and firing near the initial spawn. Check that the ship changes heading, gains momentum, and emits moving projectiles. Sample the scene to inspect screen wrapping when an object crosses an edge.

⛨ 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-35b-a3b
vendorQwen
harnesspi 0.87.1 · browser iteration
generated2026-10-14

METRICS

runtime53.6s
tokens in12k
tokens out5.8k
cached0
cost / run$0.0047
Transcript · 7 messages
system

user

Build a playable Asteroids-style game on a canvas using procedural vector graphics. Use HTML, CSS, and JavaScript as needed. Write it to `index.html` in the current working directory using your file tools. Inline your own CSS and JavaScript. Do not use external assets, CDNs, or network requests. No third-party libraries are provided. Required behavior: - Use Left/Right to rotate the ship, Up to thrust, and Space to fire. Show the controls. The ship retains momentum and wraps around every screen edge; asteroids also wrap. - Spawn moving large asteroids. A bullet hit splits a large asteroid into smaller pieces; hitting a smallest piece removes it. Hits increase the score. - Start with three lives. A ship-asteroid collision removes one life, respawns the ship, and briefly protects it from immediate repeated damage. - Clearing all asteroids starts another wave. Losing all lives shows Game Over and a Restart control that resets score, lives, and the arena. - Keep projectile lifetime bounded and prevent gameplay keys from scrolling the page. Verify: Test rotation, thrust, and firing near the initial spawn. Check that the ship changes heading, gains momentum, and emits moving projectiles. Sample the scene to inspect screen wrapping when an object crosses an edge.

assistant
thinking
The user wants me to build a complete Asteroids-style game in a single HTML file. Let me plan the implementation:

1. **Ship**: Triangle drawn with canvas, rotation (left/right), thrust (up), momentum physics
2. **Controls**: Left/Right rotate, Up thrust, Space fire
3. **Asteroids**: Large ones split into smaller ones, then disappear
4. **Bullets**: Limited lifetime, collision with asteroids
5. **Lives**: 3 lives, respawn with invulnerability
6. **Waves**: Clearing asteroids spawns new wave
7. **Game Over**: Restart capability
8. **Screen wrapping**: Ship and asteroids wrap around edges
9. **No scrolling**: Prevent page scroll from game keys

Let me write this out and then test it.
→ write /tmp/job-GFos43/index.html (16559 bytes)
toolResult

Successfully wrote to /tmp/job-GFos43/index.html

assistant
thinking
Good, the file is written. Now let me open it in the browser and test it.
→ browser {"action":"screenshot"}
toolResult

Frame 1, +0ms

[Browser image supplied to model]

{"console":["warning: An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing."],"dom":"Score: 0\n←\nRotate Left  \n→\nRotate Right  \n↑\nThrust  \nSpace\nFire\nLives:\n3\nASTEROIDS\n\nDestroy asteroids, survive as long as you can.\n\nSTART GAME","images":"attached"}

assistant
thinking
Let me inspect the page to verify the game works. I need to test rotation, thrust, firing, and screen wrapping. Let me click START GAME and then test the controls.

Let me start the game and test the core mechanics.