Alien Invasion is a classic arcade-style game written in Python. The player controls a spaceship that can move left and right and shoot bullets upwards. The objective is to destroy all the aliens before they reach the bottom of the screen.
Alien Invasion is built using the Pygame library and follows the principles laid out in the book "Python Crash Course" by Eric Matthes. It's a fun way to learn game development and Python programming.
- Classic arcade-style gameplay
- Control a spaceship to shoot bullets
- Multiple levels with increasing difficulty
- High score tracking
- Sound effects and animations
To run Alien Invasion on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/alien-invasion.git
-
Navigate to the project directory:
cd alien-invasion
-
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
-
-
Install the required dependencies:
pip install -r requirements.txt
To start the game, simply run the following command:
python alien_invasion.py
- Use the left and right arrow keys to move the spaceship.
- Press the spacebar to shoot bullets.
- Destroy all the aliens before they reach the bottom of the screen.
- The game gets progressively harder with each level.
- Track your high score and try to beat it!
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License.
Alien Invasion was created by Alexis Gonzalez. Special thanks to Eric Matthes for his book "Python Crash Course" which provided the foundation for this game.