- cmake (3.15 or newer)
- make
- raylib library
Note: Installation is only supported on GNU/Linux PC. Successful build is not guaranteed work on Windows or macOS.
- Download and install raylib library (See more here).
➔ git clone https://github.com/raysan5/raylib.git raylib
➔ cd raylib
➔ mkdir build && cd build
➔ cmake -DSHARED=ON -DSTATIC=ON ..
➔ make
➔ make install
- Generate Makefile using
cmake
:
➔ mkdir build && cd build
➔ cmake -S .. -B .
- Compile the game using
make
:
➔ make
-
You can go to VMG directory, generate a graph (or use the pre-made graph
graphData
file) and put in nearSpider-In-Hell
file. (Read more in VMG section) -
Run the game and Have fun!
➔ ./Spider_In_Hell
This game can currently be run correctly only without GUI, a graphical version is under development. Each mode can be selected when you run the game.
Run [g]raphic or remain in [t]erminal:t
When you finished deciding whether you want a GUI or not, it's time to choose the game mode. There are two game modes which will be explained throughout the rest of this document.
To see how things work, see here...
{% page-ref page="doc/the-alogrithm.md" %}
{% hint style="info" %} The first turn in every run is with the spider regardless of mode. {% endhint %}
If you're familiar with the Greedy Spiders game, this mode is almost the same as what you do in that game.
The computer moves the spider position to catch the butterflies and you have to avoid it by cutting the best edge!
{% hint style="info" %} Be careful. If you choose an edge that doesn't exist, you'll get an error and asked to choose another edge. {% endhint %}
Once you win or lose the game, the game loop will be terminated and you'll exit the game automatically.
Unlike the butterfly mode, you decide the next movement of the spider, and the computer cuts the best edge to liberate the butterflies. It means that the computer and you swap roles in Spider Mode.
Each time you have to move the spider position to catch a butterfly. Once done, you win the game.
{% hint style="info" %} Be careful. If you choose a vertex which spider can't go to, you'll get an error and asked to choose another vertex. {% endhint %}
If no route to any butterfly remains, the butterflies are liberated and you lose.
Once you win or lose the game, the game loop will be terminated and you'll exit the game automatically.
As in terminal, the game modes are pretty similar.
Once entered, you'll be asked to choose a mode for a game. Hit Left Click to select Guardian (Butterfly) mode or Right Click to select Spider mode.
If entered in Spider mode, you just need to Click on a vertex for the spider to move.
However if entered in Guardian mode, first hit the Start button for spider to make his first move. Then by left-clicking select a node and by right-clicking select another. The program will automatically remove the link between them.
{% hint style="info" %} On each mode, once game finished, you'll be redirected to Win or Lose screen! {% endhint %}
Have fun and read more about the game in doc directory if interested!