Arena survivors ("survive as long as you can while the screen fills with enemies") are perfect jam games: simple controls, an endless difficulty curve, and the score is your survival time. Here's a prompt that builds a complete one.

The prompt
Build a complete browser game as ONE self-contained index.html file (inline CSS and JavaScript, no external libraries, no asset files: draw with the canvas API using simple shapes and glow, sounds with the Web Audio API).
Game: a top-down arena survivor.
- The player (a circle) moves with WASD / arrow keys, or a virtual joystick on touch screens (drag anywhere on the left half).
- The player shoots automatically at the nearest enemy, twice per second at first.
- Enemies spawn just outside the screen and walk toward the player. Three types: basic (slow), runner (fast, fragile), tank (big, 5 hits). Spawn rate and enemy mix ramp up every 30 seconds ("WAVE n" banner).
- Killed enemies drop XP gems that fly to the player when close. Every level-up pauses the game and offers 3 random upgrades out of: fire rate, damage, extra projectile, piercing, move speed, max HP, pickup radius. Click/tap or press 1-3 to choose.
- The player has 5 HP and 1 s of invulnerability (blinking) after a hit. HUD: HP bar, wave, survival time, XP bar along the bottom.
- Game over screen with survival time, best time (localStorage) and "Press any key / tap to retry".
Technical:
- Fixed-timestep update at 60 Hz, rendering with requestAnimationFrame.
- Keep it smooth with 300+ enemies: reuse objects from pools, no allocations in the hot loop, use a simple spatial grid for collisions.
- Canvas fills the window (handle resize and devicePixelRatio); the arena is bigger than the screen and the camera follows the player.
- Pause when the tab is hidden.
- Leaderboard: add <script src="https://gamero.gg/sdk/gamero.js"></script> before your script. On game over: if (window.Gamero?.available) Gamero.submitScore(survivedMs, { board: "main", order: "desc" }).catch(() => {}). The game must work fully without it.
Reply with the full file in one code block, then a table of the balance constants (spawn curve, enemy stats, upgrade values) defined at the top of the script.
Balancing tips
Share your survival times below!