A collaborative browser game for fun with your friends, heavily inspired by Spaceteam.
Made by Gabriel Brown, Meghraj Singh, Trevor Zapiecki, and Haimeng Zhang.
Go to the following link to play a version of Pirate Plunder hosted on Heroku!
https://pirate-plunder.herokuapp.com/
- Clone this repository
cd yourDirectory
git clone https://github.com/tzapiecki/PiratePlunder
cd PiratePlunder
- Make sure you have the latest version of Python and pip installed, then set up your virtual environment
python3 -m venv venv
. ./venv/bin/activate
You should now see (venv) before each line of your command line prompt.
- With your virtual environment activated, install flask, socketio, and the eventlet extension
pip install flask
pip install flask-socketio --user
pip install eventlet --user
NOTE: You might not need to use the --user flag when installing SocketIO and Eventlet. I needed to in both cases, which is why I'm making it the default.
That's it! Remember to always activate your virtual environment with . ./venv/bin/activate in the PiratePlunder directory before you start the server.
- In the
PiratePlunderdirectory, with the virtual environment activated, start up the server
python server.py
Go to the url listed in the terminal window, grab a friend, and start playing!
Note 1: If you're just running the server locally (i.e. the url looks something like http://127.0.0.1:5000) you'll need to open up a page in two different browsers to get two players in the lobby and start the game, because players are tracked based on cookies.
Note 2: in the terminal window where you started the server, you can shut down the server at any time by entering Ctrl + C
This is where the main Flask app lives. Our Flask app handles various url requests from the client-side and responds with a new page or information about the game.
The templates for the lobby and game page live in this folder.
The login page and static images used in the game live in this folder.
All the supporting classes for the server are located here. This includes classes to represent Players, Tasks, a TaskGenerator to manage tasks and two different types of lobbies.