Giter Site home page Giter Site logo

openmafia's Introduction

openmafia Dependency Status

Screenshot of openmafia v0.3.0

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.

--countdown or -t specifies the amount of time to wait in seconds before launching a game once the minimum number of players have joined. Defaults to 10 for a normal game or 3 when in debug mode.

openmafia's People

Contributors

rustinlee avatar epinapala avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.