A car-themed arcade game built using the power of Pygame
This is our first Pygame project. It is based on the tutorial at https://pythonprogramming.net/pygame-python-3-part-1-intro/, although I have implemented it in an object-oriented way (along with other changes to the program's design).
Start by cloning this repository to a folder of your choice. Commands in this guide assume the working directory is set to the root of this repository.
In general, you'll need Python 3.8 or above, and the pygame
Python package available. For the platforms that I've tested the game on, there are some specific instructions below.
- Install the
python
andpython-pygame
packages, e.g. by runningsudo pacman -S python python-pygame
- Run the game:
python3 main.py
The game seems to work under Android using Termux with the experimental Termux:X11 add-on. Start by installing the dependencies:
$ pkg install python
$ pkg install sdl2 sdl2-image sdl2-ttf xorgproto # Libaries required by pygame
$ pip install pygame
Then, launch an X11 session (see the Termux:X11 documentation for guidance) and start the game:
$ python3 main.py
Note: This should also work for Alpine Linux in general, although you may have to replace sudo
with whatever tool your system uses for elevating permissions, e.g. doas
.
$ sudo apk add python3 py3-pygame
$ python3 main.py
These instructions should also work on Ubuntu 20.04 LTS, which Zorin OS is based on.
$ sudo apt install python3 python3-pygame
$ python3 main.py
To avoid having to start the game from the terminal, you can create a desktop entry to launch it from your applications menu. Be sure to use the absolute path to Python and set Path
to the root of this repository (so that the game can find its assets). A simple example is shown below (replace /path/to/
with the actual path to the cloned repository):
[Desktop Entry]
Type=Application
Name=A Bit Racey
Exec=/usr/bin/python3 /path/to/a-bit-racey/main.py
Path=/path/to/a-bit-racey/
Terminal=false
Categories=Game;