openmafia
v0.2.0
Published
Simple, open source online version of the popular party game Mafia
Downloads
2
Readme
openmafia
openmafia is a simple, open source online version of the popular party game Mafia, using a lightweight Node.js/Socket.IO back-end for fast and responsive gameplay.
Instructions
Download the source and navigate to the folder. Install the package's dependencies using
$ npm install
then run a server with
$ node server.js
Clients can then connect on port 8080 (or you can set a PORT environment variable).
Currently, one server process functions as one game room, and the server must be restarted between games. A lobby system is coming soon.
Options
--custom
followed by more than 3 valid non-hyphenated role names will initialize a game with a custom setup, counting each argument as a role. For example, to play a game with 3 villagers, 2 mafiosi and 1 doctor, use the following command:
$ node server.js --custom villager villager villager mafioso mafioso doctor
--debug
runs the server in debug mode. This will increase the Socket.IO logging level and automatically assign nicknames to players based on their socket ID, so you don't have to manually set up every player when testing.