pyBegin / projects / space-shooter
🎮

Space Shooter

A 2D space shooter game built with Pygame. Pilot a spaceship, fire lasers at incoming enemy ships, dodge enemy lasers and homing missiles, and rack…

509 lines🖥 Desktop only

Space Shooter

A 2D space shooter game built with Pygame. Pilot a spaceship, fire lasers at incoming enemy ships, dodge enemy lasers and homing missiles, and rack up a score, with menu and game-over screens.

Example

  1. Run python main.py. A 640×480 Pygame window opens showing the "Main Menu" with Start and Exit options.
  2. Press Enter to start. Your spaceship appears on the left; enemy ships approach from the right.
  3. Press W/S to move up and down. Click the left mouse button to fire a laser.
  4. Lasers that hit enemies increase your score (shown at the top-left). Every 10 points an additional enemy spawns.
  5. If an enemy laser or homing missile hits your ship, the Game Over screen appears with a "Play Again?" prompt.

How to run on localhost

pip install pygame
python main.py

Dependencies

pygame