oneshotlm
Compare all models on this prompt →

Brick breaker · claude-opus-4.8

Output generated Cost / run $0.1893 Runtime 64.9s

Prompt for this run

Using the pre-provided phaser.min.js (global Phaser), build a playable brick-breaker game with a paddle (arrow keys or mouse), a bouncing ball, and a wall of breakable bricks with a score. Use ONLY procedurally generated graphics via the Phaser Graphics API or generated textures — no external image or audio assets whatsoever.

⛨ 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

modelclaude-opus-4.8
vendorAnthropic · Claude
harnesspi-agent
generated2026-07-08

METRICS

runtime64.9s
tokens in20k
tokens out5.1k
cached8.5k
cost / run$0.1893
Transcript · 8 messages
user

Using the pre-provided phaser.min.js (global Phaser), build a playable brick-breaker game with a paddle (arrow keys or mouse), a bouncing ball, and a wall of breakable bricks with a score. Use ONLY procedurally generated graphics via the Phaser Graphics API or generated textures — no external image or audio assets whatsoever.

assistant
thinking
I'm setting up a brick-breaker game using Phaser and need to verify the library file is available.
→ bash {"command":"ls -la /workspace"}
toolResult

total 2116 drwxrwxrwx 3 node node 96 Jul 8 02:59 . drwxr-xr-x 1 root root 4096 Jul 8 02:59 .. -rw-r--r-- 1 node node 1181917 Jul 8 02:59 phaser.min.js

assistant
thinking
Now I'm going to start building out the game.
→ write /workspace/index.html (9296 bytes)
toolResult

Successfully wrote 9296 bytes to /workspace/index.html

assistant
→ bash {"command":"cd /workspace && node -e \"const c=require('fs').readFileSync('index.html','utf8'); console.log('bytes',c.length); ['phaser.min.
toolResult

bytes 9296 phaser.min.js true buildBricks true hitBrick true createCursorKeys true

assistant

Done. `index.html` is a fully self-contained brick-breaker game. **How it works:** - **Boot scene** procedurally generates every texture via the Graphics API — a gradient-shaded paddle, a highlighted ball, six colored bricks with bevel/highlight, and a spark particle. No external assets. - **Game scene** has: - **Paddle control** via both arrow keys and mouse movement - **Bouncing ball** with world-bounds collision (open bottom), angle-based deflection off the paddle depending on where it hits, and a small speed-up per brick - **6×10 wall of bricks** worth more points on higher rows, with particle bursts on hit - **Score & lives** UI, launch on click/SPACE, life loss when the ball drops, win when all bricks clear, and **R to restart** The game scales to fit the window. Open `index.html` in a browser to play.