An engaging social game group project created for SFU's CMPT 373 class.
It uses web sockets to connect the front-end chatbox with the C++ backend code.
Currently supports playing the game Rock Paper Scissors but is customizable to work with any game.
Team Francesinha Social Gaming Project Members:
- Max
- John
- Kirat
- Camilo
- Eric
- Lang
- Dylan
This project requires:
- C++17 or newer
- Boost >= 1.66
- CMake >= 3.12
- nlohmann_json >= 3.2.0 (https://github.com/nlohmann/json)
-
Clone the repository.
git clone https://csil-git1.cs.surrey.sfu.ca/373-20-1-francesinha/social-gaming.git -
Create a new directory for building.
mkdir build -
Change into the new directory.
cd build -
Run CMake with the path to the source.
cmake ../social-gaming/ -
Run make inside the build directory:
make
First run the Social Game server on an unused port of the server machine. The server
also takes an HTML file that it will server to standard http requests for
index.html.
bin/gameserver 4000 ../social-gaming/webgame.html
A browser based interface can be accessed by opening the URL
http://localhost:4000/index.html. The server will respond with the
specified web page above. By clicking Connect, the page gains access to the
Social Game on the server via web sockets in browsers that support web sockets.