Skip to content

This repository contains a implementation of the classic arcade game Space Invaders in Python using the Pygame library

License

Notifications You must be signed in to change notification settings

PrathameshDhande22/Space-Invader-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space Invader Game in Pygame

Size GitHub Python

Made with Python

Introduction

Welcome to Space Invaders, a classic arcade game implemented using Pygame! In this game, you play as a spaceship tasked with defending the earth from waves of alien invaders.

Gameplay

The gameplay consists of three levels. In each level, you will be faced with a wave of alien invaders that you must defeat in order to progress to the next level. You can move your spaceship left and right using the left and right arrow keys, and shoot at the aliens using the space bar.

After completing level 2, the game will randomly throw missiles at you. You can shoot these missiles using the space bar, and shooting three bullets at a missile will give you a score bonus of 50 points.

As you progress through the levels, the aliens will move faster and become more numerous. If an alien touches the bottom of the screen or enters the player area, the game is over. However, you have three lives, so if you collide with an alien, your life will decrease by 1. The enemies do not shoot at you.

The game is won when you successfully shoot down all of the aliens.

Scoring

Shooting an alien gives you a score of 10 points. In addition, shooting three bullets at a missile will give you a score bonus of 50 points.

Controls

Use the left and right arrow keys to move the spaceship left and right. Press the space bar to shoot at the aliens or missiles. Installation and Running the game To run the game, you will need to have Pygame and NumPy installed. You can install these dependencies using pip by running the following commands:

pip install pygame
pip install numpy

Once the dependencies are installed, you can clone the repository and run the game by following these steps:

git clone https://github.com/PrathameshDhande22/Space-Invader-Game.git
cd Space-Invader-Game
python App.py

Output

Click Here 👈 to See the Output

Credits

The images used in the game are taken from:

The sound effects used in the game are taken from Pixabay.

Conclusion

Thank you for playing Space Invaders! We hope you had fun defending the earth from the alien invasion.

Author : Prathamesh Dhande