BoxEscape/README.md

72 lines
3.5 KiB
Markdown
Raw Permalink Normal View History

2021-03-07 15:36:34 +00:00
# BoxEscape
Simple game where players need to escape from a prison by opening boxes, without being deceived by the guard.
I created this game to be able to remotely play games with friends during the Coronavirus pandemic. It was built using `node.js` and `socket.io`.
## The Game
You're stuck in a prison. The only way you can escape, is by finding the key in one of the boxes in your cell. But be careful, because if you open a box that contains a bomb, you're dead.
Use the tips in the boxes to find out which box contains the key. Share your findings with the other players to avoid the bombs.
But it's not that easy. One of your fellow inmates actually is a guard. The job of the guard is to make sure the prisoners don't find the key, but open a box with a bomb.
Guards know where the key and bombs are hidden, so you'll have to watch out not to be deceived by the guard's tips. On the other hand, if you don't listen to other players, you'll likely never escape.
These simple rules actually make for a pretty complex game that's still really fun to play with some friends. I enjoyed creating it, and I hope you like playing it. Have fun!
## Installation
You can host the game on your own computer, by following these steps:
**Note:** this guide assumes you're running Ubuntu and have already installed node.js on your system.
1. Open a terminal window
2. Download the code: `git clone https://git.bitscuit.be/bitscuit/BoxEscape.git`
3. Move into the project directory: `cd BoxEscape`
4. Install the dependencies: `npm i socket.io`
You can now edit the `main.js` file with your favourite text editor and change the following:
- Set the value of `hostname` to your machine's IP address on your local network. This will make it possible for anyone on your local network to join the game.
- Set the value of `port` to whatever port you want the game to run at.
## Usage
Once you've installed the game on your system, run `node main.js` to start the game.
Other players can now join the game by entering `<IP-address>:<port>` in their browser.
If you want others to be able to join over the Internet, you should forward a port on your router and redirect it to your machine. More information about this can be found [here](https://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/). Others can then join the game by entering your *public* IP address in their browser.
## Contributing
Want to help me further develop Box Escape? Awesome!
Feel free to fork this repository, add new features and submit a pull request. Thanks!
## Disclaimer
Copyright 2021 Thomas Van Acker
This project is available under the [GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html). This program comes with ABSOLUTELY NO WARRANTY.
I am not resposible for any damage that may be caused by this software. USE AT YOUR OWN RISK.
## Acknowledgements
Box Escape uses the following libraries:
- Node.js, available at [https://github.com/nodejs/node](https://github.com/nodejs/node), [license](https://github.com/nodejs/node/blob/master/LICENSE)
- socket.io, available at [https://github.com/socketio/socket.io](https://github.com/socketio/socket.io), [license](https://github.com/socketio/socket.io/blob/master/LICENSE)
- skeleton, available at [https://github.com/dhg/Skeleton](https://github.com/dhg/Skeleton), [license](https://github.com/dhg/Skeleton/blob/master/LICENSE.md)
- FontAwesome, available at [https://github.com/FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome), [license](https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt)