A small 2D space shooter built with Python and Pygame. Pilot the ship, destroy incoming meteors, and survive as long as possible while your score increases.
- Player movement with keyboard controls
- Laser shooting with a short cooldown
- Meteor spawning, movement, rotation, and collisions
- Animated explosions with sound effects
- Background music and an elapsed-time score
- Python 3.10 or newer
- Pygame 2.5 or newer
Clone the repository and enter its directory:
git clone https://github.com/fidel147/Space-Shooter.git
cd Space_ShooterCreate and activate a virtual environment:
python -m venv .venv
source .venv/bin/activateOn Windows PowerShell, activate it with:
.venv\Scripts\Activate.ps1Install the dependency:
python -m pip install -r requirements.txtRun this command from the repository root so the game can find its image and audio assets:
python scr/main.py| Action | Key |
|---|---|
| Move | Arrow keys |
| Shoot | Space |
| Quit | Escape or close the game window |
Space_Shooter/
├── audio/ # Music and sound effects
├── images/ # Sprites, font, and explosion frames
├── scr/
│ ├── main.py # Game setup and main loop
│ ├── player.py # Player, laser, and meteor sprites
│ ├── explosion.py # Animated explosion sprite
│ └── settings.py # Asset paths and game settings
├── requirements.txt
└── README.md
Created by Fidele ZOGBE as a Pygame learning project.