Top-down alien shooter · kat-coder-air-v2.5
Output generated Cost / run $0.0174 Runtime 95.9s
Prompt for this run
Using the pre-provided phaser.min.js (global Phaser), build a top-down alien shooter: move with WASD, aim and fire at waves of advancing aliens, with health, score, and increasing difficulty. Use ONLY procedurally generated graphics, no external image or audio assets.
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
METRICS
Transcript · 14 messages
Using the pre-provided phaser.min.js (global Phaser), build a top-down alien shooter: move with WASD, aim and fire at waves of advancing aliens, with health, score, and increasing difficulty. Use ONLY procedurally generated graphics, no external image or audio assets.
/tmp/ws/index.html (18679 bytes)Successfully wrote 18679 bytes to /tmp/ws/index.html
/tmp/ws/index.html (18195 bytes)Successfully wrote 18195 bytes to /tmp/ws/index.html
/tmp/ws/index.html (18081 bytes)Successfully wrote 18081 bytes to /tmp/ws/index.html
{"command":"ls -la /tmp/ws/index.html && wc -l /tmp/ws/index.html"}-rw-r--r--. 1 node node 18685 Aug 1 19:41 /tmp/ws/index.html 531 /tmp/ws/index.html
{"limit":30,"path":"/tmp/ws/index.html"}<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Alien Shooter</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; } canvas { display: block; } </style> </head> <body> <script src="phaser.min.js"></script> <script> const W = 960, H = 640; // ─── Starfield (background) ─────────────────────────────────────────────── function createStarfield(scene) { const g = scene.add.graphics(); g.fillStyle(0x050510, 1); g.fillRect(0, 0, W, H); for (let i = 0; i < 300; i++) { [502 more lines in file. Use offset=31 to continue.]
{"offset":520,"path":"/tmp/ws/index.html"}}, scene: [BootScene, MenuScene, GameScene], scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH } }; new Phaser.Game(config); </script> </body> </html>
The file is complete and well-formed. Here's a summary of what's built: **Alien Shooter** — a single-file, fully self-contained top-down shooter using Phaser 3. ### Features - **WASD/Arrow keys** to move your ship - **Mouse** to aim, **click** to fire - **3 alien types** (green blobs, red triangles, purple squares) with distinct shapes and colors - **Wave-based progression** — each wave increases alien count, speed, and HP - **Health system** with color-coded bar (green → orange → red) - **Score** that scales with wave number and alien type - **Particle explosions** on alien kills and player hits - **Screen shake & flash** effects for hits - **Engine flame** animation when thrusting - **Menu screen** with animated prompt and decorative aliens - **Game over screen** with final score, wave reached, and retry ### Technical details - All graphics are procedurally generated via Phaser's `Graphics` API (triangles, circles, rectangles) - No external assets, CDNs, or network requests - Loads `phaser.min.js` from the local directory - 3 scenes: Boot → Menu → Game (with retry loop) - Arcade physics for all objects