Alien Invasion is a classic arcade-style game where the player controls a rocket ship at the bottom center of the screen. The goal is to shoot down fleets of aliens moving horizontally across the screen while avoiding collisions and enemy fire.
-
Controls: Use the arrow keys (left and right) to move the ship. Press the spacebar to shoot bullets at the aliens.
-
Alien Fleet: Initially, a fleet of aliens fills the sky and moves across the screen.
-
Destroy Aliens: Shoot bullets to destroy the aliens. Each alien destroyed earns the player points.
-
Increasing Difficulty: After clearing a fleet, a new fleet appears that moves faster, challenging the player's reflexes.
-
Ship Health: The player starts with three ships. Colliding with an alien or allowing an alien to reach the bottom of the screen costs a ship.
-
Game Over: The game ends when the player loses all three ships.
-
Movement: Use the arrow keys (left and right) to navigate the ship.
-
Shooting: Press the spacebar to fire bullets and eliminate the aliens.
-
Objective: Shoot down all aliens while preserving your ships to achieve the highest score possible.
Ensure you have Python and Pygame installed on your system:
-
Python: Download Python from python.org.
-
Pygame: Pygame is a set of Python modules designed for writing video games. Install it using pip:
pip install pygame
-
Clone the repository:
git clone https://github.com/donaldworlds/alien-invasion.git
-
Navigate to the project directory:
cd alien-invasion -
Start the game:
python3 alieninvasion.py
-
Navigate the ship using the arrow keys to avoid collisions with aliens.
-
Utilize the spacebar to shoot bullets and clear the path ahead.
-
Aim to achieve the highest score by eliminating as many aliens as possible without losing all your ships.
Enjoy playing Alien Invasion and have fun!