/backgammon-nodejs

Primary LanguageJavaScriptMIT LicenseMIT

MDKrieg fork

07/13/2020

Intended additions

  • Implement different board theme
  • Customize and polish UI
    • Hover style on clickable items
    • Show move hints
    • Add screenshots to rule selector buttons
    • Update move mechanic to click-on-destination
    • Show double dice
    • Show upper header by default
    • Add some log-style status output to header
  • Add email/text link functionality
  • Implement user management

backgammon.js Build Status

Extensible multiplayer backgammon game written in JavaScript

Current version: 0.6

See CHANGELOG for recent changes.

Features:

  • Challenge friends or play with strangers online without registration and game setup process.
  • Fair gameplay that is as close to real game as possible:
    • no visual hints (eg. for allowed moves);
    • no pip counter;
    • quality random generator.
  • Extensible and modular engine that would allow the open source community to implement different variants of the game as known in different countries and different user interfaces (eg. themes).
  • Lightweight - playable on any device, even old ones - anything that can run a modern browser;
  • Works in browser @ PC & Mobile;

If you want to learn more about the project see Detailed documentation.

Screenshot

Landing page

You can try the game locally or deploy it to your own server.

Deploy

How to install

To host the game on your own server or test it locally for development, you need to install the main backgammon.js package. It includes both the backgammon.js server and client.

There is no need to install the client separately, as it is served automatically from the server via HTTP. Client should work in modern browsers of both desktop PCs and mobile devices.

The universal way to install the server is:

  1. Clone repository locally

  2. Change working directory to the local copy of the repository

  3. Run:

     npm install
     npm start
    

The game server has been tested to work on the following platforms:

Follow the links above for more detailed installation instructions on those platforms.

How to change default rule

Currently three rules have been implemented (as known in Bulgaria):

The player can choose which rule to play before starting a new game.

How to add new rules (variants)

Short instructions on how to add new rules are available here: Creating rules for backgammon.js.

Documentation:

Screenshots

Classic rule:

Classic rule

Gul bara rule:

Gul-bara rule