Pirate Invaders is a game based on the game Space Invaders. The player controls a horizontally moving character. Players goal is to achieve the highest score by eliminating enemy entities.
- Download Python (v3.10+)
- Download Pygame (v2.1.2)
- Clone this repository or download it as a ZIP file
git clone https://github.com/MiraZzle/pirate-invaders
- Open the project in an IDE of your choice
- Run the ./source_code/main.py
- To run the game from Terminal, make sure your current working directory is
pirate_invaders
. From terminal, run this command:
python3 ./source_code/main.py
-
- Moves horizontally and shoots a projectile to destroy enemies. The player has 3 lives, which are lost by colliding with enemy projectiles or colliding with enemy entity.
-
- Moves horizontally in a group. If a member of enemy group touches a side of the game window, the enemy group switches direction. Randomly fires a projectile. On collision enemy projectile subtracts a player life or deletes a piece of wall. There are 3 enemy types, which differ in points given after their destruction by player.
-
- Moves horizontally. Spawns on top of the screen at random time. Gives bonus points if destroyed.
-
Wall
- Static entity. Protects the player from enemy projectiles. This entitity can be destroyed by colliding with any projectiles. Resets every new round.
Key | Action |
---|---|
→ | Move Right |
← | Move Left |
Space | Shoot |
Enter | Restart Game |
- Game Over conditions:
- Game ends if player health reaches 0
- Game ends if player collides with an enemy