Space Invaders is a classic arcade-style shooting game implemented in Python. In this game, you control a spaceship at the bottom of the screen and must shoot down waves of descending aliens before they reach you. The game features:
- Player-controlled spaceship
- Alien enemies that move and shoot
- Laser projectiles
- Simple graphics using Python
- Use the arrow keys to move your spaceship left and right.
- Press the spacebar to shoot lasers at the aliens.
- Avoid enemy lasers and prevent aliens from reaching the bottom of the screen.
- The game ends if your ship is hit or if the aliens reach the bottom.
- Python 3.x installed on your system
- (Optional)
pygamelibrary for enhanced graphics and controls
- Clone or download this repository to your local machine.
- (Optional) Install
pygamefor better graphics:pip install pygame
- Open a terminal in the project directory.
- Run the main game file:
python main.py
main.py: Entry point for the game.player.py: Handles player spaceship logic.alien.py: Manages alien enemy behavior.laser.py: Controls laser projectiles.create_ship_image.py: Utility for creating ship images.data/: Contains game assets (images, sounds, etc.).
- You can modify the code to add new features, change graphics, or adjust difficulty.
- Replace assets in the
data/folder to personalize the game.
This project is for educational and personal use. Feel free to modify and share it.
Inspired by the original Space Invaders arcade game.