Giter Club home page Giter Club logo

macgyver-maze's Introduction

Macgyver-maze

Overview

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.

Installation

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

Run the game

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

Game settings

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.

Game controls

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 !

Compilation

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

Error with SDL

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.

macgyver-maze's People

Contributors

dylamn avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.