Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 977 Bytes

README.md

File metadata and controls

37 lines (33 loc) · 977 Bytes

Space Invaders

Basic Implementation of the game Space Invaders using pygame library in python3

How to run

  • Run all the commands in one terminal tab
  • Install python3 and python3-venv
sudo apt install python3 python3-venv
  • Create a virtual environment, activate the environment and install dependencies
python3 -m venv env
source env/bin/activate
pip install --upgrade pip && pip install -r requirements.txt
  • Play the game
python3 src/Main.py
  • After finishing playing, deactivate environment and clean up
deactivate
rm -r env/ src/__pycache__/

Controls

  • A - Move left
  • D - Move Right
  • SPACE - Shoot missile A
  • S - Shoot missile B
  • Q - Quit

Details

  • Missile A kills alien instantly increasing score by 1
  • Missile B freezes the enemy for till 5 seconds after it hits the alien
  • Aliens spawn randomly around the top region of the screen