This game is mainly designed by using object-oriented programming and pygame package. I created a lot of classes to define what the player spaceship and enemies spaceships should move in the game. What should the game react when the player controls his spaceship.

Space Invaders Game Demo
Here are the steps:

1. Install pygame and import some space ships' images.

2. Create the main class: set clock speed to 60fps. create a background. set a while loop.

3. Set how to control keys and how many pixels that a player can move when he presses the key. (set to 5 pixels).

4. Set WASD and keys to move up, left, down, and right. Set the object within the background.

5. Create player and enemy classes.

6. Use Map function. If a random color is red, use a red spaceship and red laser. If it's blue, use blue. If it's green, use green.

7. Set enemy spaceships to move down.

8. Set the relationship between enemies and lives, and set lost conditions.

9. Set lasers and collision classes. Use the space key to shoot.

10. Set lasers condition. If lasers are off the screen, remove them. If it collides, your health -10.

11. Set collision and health bar classes.

12. Done



Software used: Python, Pycharm, Git, Adobe Premiere

Packages used: pygame, os, random, time

Click the "Code" button to see the code of this project