/oriflamme

Online multiplayer implementation of Oriflamme card game using React, Socket.io, MongoDB

Primary LanguageJavaScript

Oriflamme

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.

Screenshot from 2021-12-13 17-24-15

Screenshot from 2021-12-13 17-31-13

Technologies

Front end:

Back end:

Back end (/server directory)

To successfully run the server in development mode you will need to install

Once you have those installed:

  1. Open a terminal
  2. 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 )
  3. Ensure you have the latest merged changes by executing following commands:
git checkout master
git pull
  1. Open the server folder and install all required application modules and dependencies:
cd server
npm install
  1. 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
  1. 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.

Front end (/client directory)

To run the front end:

  1. Open a new terminal - leave the terminal with the server running, don't close it
  2. Open the client folder and install all required application modules and dependencies (this may take some time):
cd client
npm install
  1. Once complete, run the React development server with
npm start
  1. 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.