jwatzman / murderisinthecards

A deductive board game for 3-6 players, in the style of Clue/Cluedo. Played with human opponents, in real-time over the internet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Murder Is In The Cards

A deductive board game for 3-6 players, in the style of Clue/Cluedo. Played with human opponents, in real-time over the internet.

The game is deeply inspired by Clue/Cluedo --- anyone who has played that will feel right at home --- though it is not officially affiliated with it.

Installation

yarn install
yarn build

You'll then need to arrange for your webserver to serve the contents of dist/static as a webroot and to run dist/server/server.js which sets up a websocket server on port 2567. You'll then need to reverse-proxy requests for /game to the websocket server.

Development

yarn build
yarn dev

Then load http://localhost:3000 which has a development server running serving the client there, configured to connect to the development websocket server on port 2567. There are also watch rules in place to rebuild the client and server, and to restart the server after a rebuild. (You'll need to manually refresh the client for now.)

Game Rules

The object of the game is to figure out, by process of elimination, the details of a murder: who committed the murder, with what weapon, and where. At the beginning of the game, a murderer, weapon, and location are picked in secret; the other suspects, weapons, and locations are passed out secretly as cards to each of the other players.

Play proceeds with players rolling a die and moving around the board. When you enter a room (via one of the doors), you may make a "suggestion", picking a suspect and weapon (and using the current room as the location). Play proceeds around, with each player trying to "disprove" the suggestion by showing one of the named cards to the person who made the suggestion (thus proving that card is not part of the murder). This ends once the suggestion is disproved, or once everyone announces that they cannot disprove the suggestion.

Only one suggestion can be made after entering a room. A secret passage exists between the pairs of corner rooms, which a player can use instead of rolling the die. Any player named in a suggestion is moved into the room where the suggestion was made, and may themself make a suggestion on their next turn as if they had just entered the room.

Finally, at any point on their turn, if a player thinks they know how the murder was committed, a player may make an "accusation", and name any suspect, weapon, and room. If they are correct, they win the game; if they are incorrect, they lose and are eliminated from the game, serving only to disprove further suggestions by other players.

For a detailed explanation, consult the rules of Clue/Cluedo.

Tech

Colyseus for game state sync, websockets, etc. NodeJS on the server, React on the client, all TypeScript.

This is my first Node project, first React project, and in general the largest body of Javascript I've written. It's an experiment and for fun with my family during the Covid-19 lockdown --- it's not supposed to be, and likely isn't, a fantastic example of how to organise these projects, or of great code style, or really of anything at all.

About

A deductive board game for 3-6 players, in the style of Clue/Cluedo. Played with human opponents, in real-time over the internet.

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 94.1%Language:JavaScript 5.0%Language:HTML 0.6%Language:Shell 0.3%