Back to Prompt LibraryKeyboard: WASD to move
Gamepad: Left stick to move
Shooting is automatic - aims at nearest zombie
Games
Zombie Apocalypse
Top-down survival shooter - fight zombie waves, collect XP, upgrade your weapons
Guide
Zombie Apocalypse
Build a survivor.io-style top-down zombie survival game. Move around, auto-shoot zombies, collect XP to level up and get stronger!
No Setup Required
This is a frontend-only game. Just run it and survive!
Controls:
Final Prompt
### Purpose Build a top-down zombie survival shooter game inspired by survivor.io that runs in the browser. ### Game Design **Visual Style** - Top-down view of arena/map - Dark apocalyptic theme with muted colors - Player character clearly visible in center - Zombies approaching from all directions - Blood splatter effects on zombie death - Glowing XP gems scattered on ground **Player Character** - Circular or simple humanoid sprite - Always faces direction of nearest enemy - Auto-shoots projectiles at nearest zombie - Health bar displayed above player - Brief invincibility frames when hit (flashing) - Dies when health reaches zero **Weapons & Shooting** - Auto-aim: Always targets nearest zombie - Auto-fire: Shoots automatically at fire rate interval - Starting weapon: Basic pistol (single shot) - Projectiles travel toward target, can hit other zombies in path - Visual muzzle flash on shoot **Zombie Types** - Basic zombie (green): Slow, low HP, common - Fast zombie (red): Quick movement, low HP - Tank zombie (purple): Slow, high HP, deals more damage - Spawns increase each wave **XP & Leveling System** - Zombies drop XP gems on death (green glowing orbs) - Walk over gems to collect - XP bar fills at top of screen - When XP bar full: LEVEL UP! - Level up pauses game, shows upgrade selection **Upgrade Selection (on Level Up)** - Display 3 random upgrade options - Player picks one to apply - Upgrades stack and combine - Options include: - Damage +20% - Fire rate +15% - Move speed +10% - Max HP +25 - Projectile size +20% - Piercing shot (hits multiple enemies) - Spread shot (fires 3 projectiles) - Orbit shield (rotating projectiles around player) **Wave System** - Wave number displayed on screen - Each wave: zombies spawn for 30-60 seconds - Brief rest between waves (5 seconds) - Each wave: more zombies, more variety, faster spawns - Boss zombie every 5 waves (huge, high HP) **Scoring & Game Over** - Score = zombies killed + waves survived bonus - High score saved to localStorage - Game over when player HP reaches zero - Show stats: zombies killed, waves survived, time alive **Game Flow** - Start screen with "SURVIVE" title - Press start to begin Wave 1 - Survive as long as possible - Game over screen with stats - "PLAY AGAIN" option ### Controls **Keyboard** - WASD: Move in 8 directions - Enter: Start game / Confirm selection - 1/2/3 keys: Select upgrade option (during level up) **Gamepad Support (IMPORTANT)** The entire game must be playable with a gamepad controller, including menus: - Use the Gamepad API: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API - Left analog stick: Move player - D-pad: Navigate upgrade selection (left/right) - A button (buttons[0]): Confirm upgrade selection - A button on start screen: Begin game - A button on game over: Restart - Start button (buttons[9]): Pause game - Show "Gamepad Connected" message when controller detected - Poll gamepad state in game loop using `navigator.getGamepads()` ### Technical Notes - Use HTML5 Canvas for rendering - 60 FPS game loop with requestAnimationFrame - Object pooling for projectiles and zombies (performance) - Spawn zombies outside visible screen, move toward player - Simple collision detection (circle-circle) - Responsive canvas that scales to fit screen - No external dependencies needed