I really wanted to take a deep dive into WebSockets and enjoy modern boardgames so this is a match made in heaven. This is a browser implmentation of Oriflamme by Studio H Games.
Players find themselves in the middle of a medieval feud over the French royal crown. The King is dead - long live the King! As heads of influential families, the players strive to come to power using cunning, malice, strength, virtue and infamy. The player with the most Influence after 6 rounds wins the throne, and the game!
You can see a video of the implmentation here. Rules can be found in the resources
folder.
Front end:
Back end:
To successfully run the server in development mode you will need to install
- NodeJS and the
npm
package manager - MongoDB - use the Community Server
Once you have those installed:
- Open a terminal
- Navigate to the main project folder (it should be named oriflamme and contain 2 directories named client, server and resources along with this file, named README.md )
- Ensure you have the latest merged changes by executing following commands:
git checkout master
git pull
- Open the server folder and install all required application modules and dependencies:
cd server
npm install
- The server requires a
.env
("dotenv") file to run. It may be hidden or missing. If not present, you can create one in the server directory
touch .env
Open the file in an editor and add the following before saving it:
PORT=7777
DB_URL=mongodb://localhost:27017
DB_NAME=oriflamme
- Once complete, run the server (runs on port 7777) with
npm start
To stop the server, focus the terminal window running the server process and press CTRL+C.
To run the front end:
- Open a new terminal - leave the terminal with the server running, don't close it
- Open the client folder and install all required application modules and dependencies (this may take some time):
cd client
npm install
- Once complete, run the React development server with
npm start
- Open a couple of different browsers and point them to
http://localhost:3000
. You can also run one or more browsers in incognito mode to try the game with 2+ players.