Skip to content

Latest commit

 

History

History
153 lines (92 loc) · 5.84 KB

README.md

File metadata and controls

153 lines (92 loc) · 5.84 KB

doko3000

Simple open world multiplayer Doppelkopf card deck simulation web service.

Overview

The 2020 coronavirus pandemic spring lockdown forced us to move our Doppelkopf gatherings from real world to online. Doko3000 helps to keep the ongoing league competition going.

It just provides a virtual table with virtual cards. Players play like in the real world, preferably talking to each other via video conference in a parallel window. To preserve as much normality during the pandemic as possible, doko3000 is intended to be as digital as necessary, as analog as possible. This is why no rules are included, because there are so many and players should apply them like sitting at a real table. This means absolute freedom to play with all custom rules players are used to play.

For the same reason there are no global scoreboards or statistics - it will even feel more familiar if somebody of the group notes the score as before.

Doko3000 runs on a web server and is accessed by the players via web browser.

Ingame language at the moment is only german due to Doppelkopf being a mostly german phenomenon. Might change in the future.

Demo

Have a look at it at work at https://doko3000-demo.dhcpy6d.de. Four accounts are available with their respective passwords:

  • demo1: demo1
  • demo2: demo2
  • demo3: demo3
  • demo4: demo4

Gameplay

Most likely every game starts with sorting cards:

doko3000 sorting cards

After all players had their turns it's time to claim the trick:

doko3000 playing cards

The last trick finishes the current round and makes the score appear:

doko3000 finished

Management

The admin user has the right to create new players, which themselves can be administrators too.

Every player is able to create new tables via the nice green Neu button.

Players can enter a table by clicking the green Beitreten button in the table's row:

doko3000 create table

If at least 4 players entered a table a round may begin. Configure it via the Einstellungen in the hamburger menu at the upper left. The order of the players may be changed by drag & drop. As always the first player is dealing and the second will be the first to play. Run it via Neu starten button:

doko3000 start

Installation

Doko3000 is a Python web application mostly based on:

As server anything capable of running Python might work, but best experiences were made with containers on Linux.

As client any current browser will do, as long as it can make use of WebSocket, which is necessary for the game communication.

Getting doko3000

The game is available from Github:

git clone https://github.com/HenriWahl/doko3000.git

All further steps are based on the doko3000 directory:

cd doko3000

Environment file .env

Inside the environment file some variables could be set:

  • HOST - name of the server host to be used at least as cors_allowed_origins in flask
  • COUCHDB_URL - URL of CouchDB server
  • COUCHDB_DATABASE - name of database on server
  • COUCHDB_USER - CouchDB user used by containers doko3000 and couchdb
  • COUCHDB_PASSWORD - CouchDB password used by containers doko3000 and couchdb
  • SECRET_KEY - secret key for flask sessions
  • DEBUG - enable Flask-Socketio debugging

The example file /docker/default.env can be copied to .env wherever docker-compose is intended to be run:

cp docker/default.env .env

The default settings should already work - only COUCHDB_USER and COUCHDB_PASSWORD have to be set at least once to initialize the CouchDB database in the doko3000-couchdb container.

Running the server with docker-compose.yml

In ./docker there are some example docker-compose configuration files. Just run one of them from the root directory you're in.

As one can see there a CouchDB server is required.

The simplest way is running it only accessible via HTTP on port 80:

docker-compose -f docker/docker-compose.yml up -d

If you plan to use HTTPS better use the docker-compose-https.yml file. Copy the certificate and key files respectively as cert.pem and key.pem into /docker and run:

docker-compose -f docker/docker-compose-https.yml up -d

The file docker-compose-traefik-letsencrypt.yml can be used for Let's Encrypt setups. This docker-compose configuration surely has to be customized.

If you need help to get it running do not hesitate to contact me.

Running prebuilt image from Dockerhub

Instead of build the Docker image locally it is also possible to use it from Dockerhub:

docker pull henriwahl/doko3000

Et voilà!

If you run it on your local machine, point your favorite browser to http://localhost and you will find the login page:

doko3000 login admin

The default user is admin with the password admin and admin rights. It can create other players and should get a new password soon.

Custom cards

If you want to use another card design you can just replace the cards in /doko3000/static/img/cards. If containers are used this directory might just be mounted as volume.

Good luck and don't hesitate to give some feedback at https://github.com/HenriWahl/doko3000/issues.