Skip to content

kitsuyaazuma/Space-Invaders-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space Invaders Python

demo_20221118.mp4

Development Environment

  • MacBook Pro (2021, Apple M1 Pro)
  • Python 3.9.15

Usage

By using --help or -h option, you can get a useful message about the game settings.

% python main.py --help
usage: main.py [-h] [--diff DIFF] [--lives LIVES]

optional arguments:
  -h, --help     show this help message and exit
  --diff DIFF    the game difficulty (default=easy, easy | medium | hard)
  --lives LIVES  the initial number of lives (default=3)

You can run the program with the following commands:

python main.py

Raspberry Pi Implementation

IMG_8485 IMG_8486

You can also run this program on the Raspberry Pi.

WiringPi is an implementation of most of the Arduino Wiring functions for the Raspberry Pi. The library is packaged on PyPI and can be installed with pip:

pip install wiringpi

Before running the program, execute the following command on the LXTerminal.

gpio export 5 out
gpio export 6 out
gpio export 13 out
gpio export 19 in
gpio export 21 in
gpio export 26 in

Now, you can run the program with the following commands:

python raspi_main.py

About

nInvaders-like Space Invaders game implemented in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages