diplomacy-server alternatives and similar packages
Based on the "Unclassified" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of diplomacy-server or a related project?
Play the board game Diplomacy over HTTP. Players may participate via their own private devices, so long as they have network capabilities and a good web browser.
Start by installing the program.
git clone firstname.lastname@example.org:avieth/diplomacy-server.git cd diplomacy-server cabal install
In order to get up and running you need a public/private key pair and certificate, because the web server uses secure HTTP. Here's how to create a key pair and self-sign a certificate using OpenSSL. Note that your browser will warn of an untrusted certificate when you connect to the server.
openssl req -x509 -newkey rsa:2048 -keyout server.key -out server.pem -days 365 -nodes
When running the server, the key and certificate file locations can be
-c respectively; the defaults are
./certificate.pem. When running the server you must also give a username and
password for the administrator. These credentials allows you to create, start,
advance, pause, and destroy games. The password is taken after running the
command, rather than as an argument.
./Main -u <username>
The default port is
4347, but this can be changed using
the server running, navigate to
begin playing via the simple but effective web client. The workflow is as
- Administartor creates a game, choosing a password for it.
- Players join the game using the administartor's chosen password.
- Adminstrator starts the game. A game cannot be started unless there are at least 3 players in the game. Two player diplomacy is not supported.
- Players use their own devices (smartphones, laptops) to view game state and issue orders.
The game will advance automatically unless the adminstrator pauses the game. In this case, the game will advance only when the adminstrator explicitly advances it, at which point the automatic advance feature kicks in again. This is useful for putting a game on indefinite hiatus.
The simple client
client.html is a barebones, not-so-user-friendly interface for
players and administrators (game-masters, if you will). It should provide
all necessary functionality to play a complete match, and should work
properly on all smartphones and personal computers with up-to-date web browsers.
To input typical and retreat phase orders using this client, one must type the order object as it would be written in a pen-and-paper game; the map is not interactive, but this would be a nice improvement.
A note on REST
This program uses the rest package, but it doesn't give a RESTful API; the server is stateful. This package was chosen because it was relatively quick and easy. It ought to be swapped out for something which
- Does not claim to be RESTful.
- Allows us to easily reuse handlers for HTTP and Email input.