Background
This Python game has been created to provide coding beginners with a simple example and framework for creating games, using Python classes. It is best to read this article, install the game and then read through the Python script files. If at that point you require a simpler starting point, I recommend you view the video tutorials created by Andy Balaam,
click here to see his channel.
Configuring the OS
I have tried this game on the Raspberry Pi OS distributions, Arch Linux and Raspbian.
When playing the game, press '1' to start a new game. Use the cursor keys to play the game. Press the 'Esc' key to exit the game.
Install the following by typing the at the command line as a root user.
For Raspbian:
# Update OS.
apt-get update
apt-get upgrade
reboot
# Get the game source code.
cd ~
wget https://github.com/BirchJD/PiMan/archive/master.zip
unzip master.zip
# Start the game.
cd ~/PiMan-master
modprobe snd-bcm2835
xinit /usr/bin/python PiMan.py
For Arch Linux:
# Update OS.
pacman -Syu
reboot
# Install Raspberry Pi Video drivers.
pacman -S xf86-video-vesa
pacman -S xf86-video-fbdev
# Install basic X Windows.
pacman -S xorg-server
pacman -S xorg-xinit
# Install PyGame library.
pacman -S python2-pygame
# Unzip required to uncompress library.
pacman -S unzip
# Get the game source code.
cd ~
wget https://github.com/BirchJD/PiMan/archive/master.zip
unzip master.zip
# Start the game.
cd ~/PiMan-master
modprobe snd-bcm2835
xinit /usr/bin/python2 PiMan.py