macgyver-maze is a game written in python where the player is the famous MacGyver, lost inside a maze.
The exit is protected by a guardian and MacGyver needs to bypass him in order to escape. To do this, MacGyver must combine three components (a plastic tube, a needle and a bottle of ether) to make a syringe that can put the guard into a deep sleep.
This application needs the pygame
module installed. To do that, you must the module via pip. I recommend to use a
virtual environment. You can either use the integrated library venv
since python 3.3, virtualenv or any tool you want.
For example with venv, you can create and activate with the following:
$ python3 -m venv venv
$ source venv/bin/activate
All dependencies of the projects are listed in the requirements.txt file at the root of the project. After you have created your virtual environment and activate it, use the following command to install dependencies:
$ python3 -m pip install -r requirements.txt
After the pygame package is installed. The entry point of the application is the main.py
file.
You have to run the file as a script with the python interpreter:
$ python3 main.py
There's a default settings file which the game use that can be changed (you must change them when the game isn't running)
The game is provided with a minimum resolution of 640x640, therefore, it is not recommended to save a lower resolution than the one mentioned above to ensure proper working of the game.
First, if you want to go back to the previous menu, you can press the echap key (your game session is not reset) The game play musics and sounds.
If you want to decrease/increase the volume, you can press either - or + keys of the numeric keypad. If you simply want to mute/unmute the audio, press F1.
To move MacGyver, use the keyboard arrows:
← ↑ → ↓
or, if you prefer you can use the classic z q s d with an azerty keyboard layout.
MacGyver will collect every object simply by walking on it. The syringe can be crafted when MacGyver gather all necessary items.
To craft the syringe:
Press C when the text is prompted
Hope you'll like it !
A setup.py file is present at the root of the project which is correctly configured for compilation using cx_freeze. To start a compilation with, use :
$ python setup.py build
At some times, you can get an error when installing pygame
like this one:
Unable to run "sdl-config". Please make sure a development version of SDL is installed.
If you use python3.8, try to install pygame
with another python version.
If the problem is still there, try to install (globally) the following packages:
sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev
You can also check this question asked on Stack Overflow which can help you a lot.