Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henriwahl/doko3000
Simple open world Doppelkopf deck simulation for playing online with your friends via browser.
https://github.com/henriwahl/doko3000
cards couchdb doppelkopf flask game german javascript jquery multiplayer players python server simulator tabletop web
Last synced: 2 months ago
JSON representation
Simple open world Doppelkopf deck simulation for playing online with your friends via browser.
- Host: GitHub
- URL: https://github.com/henriwahl/doko3000
- Owner: HenriWahl
- License: agpl-3.0
- Created: 2020-04-05T22:08:53.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-16T08:14:44.000Z (about 2 years ago)
- Last Synced: 2023-04-03T15:00:35.133Z (almost 2 years ago)
- Topics: cards, couchdb, doppelkopf, flask, game, german, javascript, jquery, multiplayer, players, python, server, simulator, tabletop, web
- Language: Python
- Homepage: https://github.com/HenriWahl/doko3000
- Size: 21 MB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](doc/doko3000-sorting_cards.gif)
After all players had their turns it's time to **claim** the **trick**:
![doko3000 playing cards](doc/doko3000-playing_cards.gif)
The last trick **finishes** the current round and makes the **score** appear:
![doko3000 finished](doc/doko3000-finished.gif)
## 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](doc/doko3000-create_table.gif)
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](doc/doko3000-start.gif)
## Installation
Doko3000 is a [Python](https://python.org) web application mostly based on:
- [Flask](https://flask.palletsprojects.com)
- [Flask-SocketIO](https://flask-socketio.readthedocs.io)
- [CouchDB](https://couchdb.apache.org/)
- [SVG-Cards](http://svg-cards.sourceforge.net/)
- [Dragula](https://bevacqua.github.io/dragula/)
- [Bootstrap](https://getbootstrap.com)
- [jQuery](https://jquery.com)
- [Open Iconic](https://useiconic.com/open)
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.gitAll 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 debuggingThe example file [/docker/default.env](./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](./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](doc/doko3000-login_admin.gif)
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.