A classic space invaders game made in Python using Pygame.
Major things that I want to focus on learning in this project
- Pygame
- Object-Oriented Programming
- Unit Testing (Pytest)
- Player have 3 lives.
- When enemy bullets or enemy ships hit Player's ship, Player will lose 1 life.
- Player shall be invulnerable during the first 2 seconds of the new life
- Player's ship can only move along the x-axis on the ground at a fixed speed by pressing ARROW_LEFT & ARROW_RIGHT keys
- Player's ship can shoot bullets towards the enemy ships by pressing SPACE key, with a limit of 4 bullets per second
- Enemy ships appear randomly, moving downwards at a fixed speed
- Enemy ships can shoot bullets randomly. There is no limit on enemy bullets.
- Clone GitHub repository
- Install Pygame: pip install pygame
- Run: python main.py