Back to Prompt Library
Games

8-bit Space Shooter

Classic arcade-style space shooter with pixel art graphics and gamepad support

Guide

8-bit Space Shooter

Build a retro arcade-style space shooter game with pixel art graphics.

No Setup Required

This is a frontend-only game. Just run it and play!

Controls:

  • Keyboard: Arrow keys to move, Space to shoot

  • Gamepad: Left stick to move, A button to shoot
  • Final Prompt

    ### Purpose
    Build a classic 8-bit style space shooter arcade game that runs in the browser.
    
    ### Game Design
    
    **Visual Style**
    - Retro 8-bit pixel art aesthetic
    - Starfield background scrolling vertically
    - Pixelated player ship, enemies, and projectiles
    - Screen shake on explosions
    - Retro color palette (limited colors like NES/arcade)
    
    **Player Ship**
    - Positioned at bottom of screen
    - Smooth movement in all directions
    - Firing laser projectiles upward
    - 3 lives, shown as ship icons
    - Brief invincibility after getting hit (flashing effect)
    
    **Enemies**
    - Multiple enemy types with different movement patterns
    - Basic enemies: move down in formation
    - Zigzag enemies: move side to side while descending
    - Fast enemies: quick dive attacks
    - Enemies spawn in waves, increasing difficulty
    
    **Combat & Effects**
    - When projectile hits enemy: enemy explodes with particle explosion effect
    - When enemy hits player: player explodes, loses a life, respawns with invincibility
    - Explosion animation: pixelated burst, expanding then fading
    - Sound effects: 8-bit style pew-pew, explosions, power-up pickup
    
    **Power-ups**
    - Dropped randomly by destroyed enemies
    - Double shot: fire two projectiles
    - Speed boost: faster movement
    - Shield: absorbs one hit
    - Power-ups last 10 seconds
    
    **Scoring**
    - Points per enemy destroyed (10, 25, 50 based on type)
    - Bonus points for wave completion
    - High score saved to localStorage
    - Score displayed at top of screen
    
    **Game Flow**
    - Start screen with "PRESS START" flashing
    - Wave number displayed at start of each wave
    - Game over screen showing final score and high score
    - "PLAY AGAIN" option
    
    ### Controls
    
    **Keyboard**
    - Arrow keys: Move ship (up, down, left, right)
    - Space: Fire weapon
    - Enter: Start game / Restart
    
    **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 ship
    - A button (buttons[0]): Fire weapon
    - Start button (buttons[9]): Start game / Pause
    - A button on start screen: Begin game
    - A button on game over screen: Play again
    - Poll gamepad state in game loop using `navigator.getGamepads()`
    - Show "Gamepad Connected" message when controller detected
    
    ### Technical Notes
    - Use HTML5 Canvas for rendering
    - 60 FPS game loop with requestAnimationFrame
    - Responsive canvas that scales to fit screen
    - No external dependencies needed
    AI-Powered App Builder | OptiDev