Deckathlon

A card game website engine.

This project is maintained by suurjaak

Deckathlon

A card game website engine. Users can register an account, create their own game table, or join an existing one as player or spectator.

Comes installed with a few game templates, more can be added.

Installation

Download and unpack ZIP, install Python and pip, run pip install -r requirements.txt in deckathlon folder. By default, Deckathlon uses SQLite as database engine, created automatically. To use Postgres, create the database, populate it with deckathlon/etc/db/postgres.sql, and add at least the following to deckathlon/etc/deckatlhon.ini:
DbEngine = "postgres"
DbOpts.database = "myname"
DbOpts.username = "myuser"

Running The Program

Deckathlon can be run as a stand-alone web server:

python -m deckathlon
Or under a WSGI-supporting web server like Apache, see deckathlon.wsgi.

Configuration

Default configuration file is deckathlon/etc/deckatlhon.ini, can be overridden with environment variable DECKATHLONCONF specifying another path.

SQLite parameters:
DbEngine = "sqlite"
DbOpts = "path to SQLite db"
Postgres parameters:
DbEngine = "postgres"
DbOpts.database = "myname"
DbOpts.username = "myuser"
DbOpts.password = "mypass"
DbOpts.host     = "localhost"
DbOpts.port     = 5432
DbOpts.minconn  = 1
DbOpts.maxconn  = 4
Web server parameters:
ServerIP      = "0.0.0.0"
ServerPort    = 9000
ServerPrefix  = "extra prefix if using reverse proxy"
ServerBackend = "wsgiref or paste or cherrypy etc if running as stand-alone"
SessionPath   = "path to login session files"
Quiet         = True
Localization parameters:
Languages       = ["en", "et"]
DefaultLanguage = "en"
Logging parameters:
LogLevel     = "DEBUG"
LogPath      = "path to log file"
ErrorLogPath = "path to error log file if separate from log file"
Game engine parameters:
OfflineInterval      = 180 # Seconds after which player is considered offline
OnlineUpdateInterval = 30  # Seconds between updating player online status
PollInterval         = 1   # Seconds between data update poll requests

Localization

Uses Portable Object (.po) files, residing under deckathlon/etc/i18n, language selection specified in configuration.

Game templates can specify their own translations, both for template properties like name and description plus any translation strings, in templates.i18n, as
{language code: {"template.propertyname" or text: translation}}.

Source Dependencies

Deckathlon needs Python 2.7, and the following 3rd-party Python packages:

If using Postgres database engine:

Attribution

Includes font DejaVu Sans, CC BY-NC-ND 4.0, github.com/web-fonts/dejavu-sans, vendored under static/media/.

Uses Vue.js (github.com/vuejs/vue, MIT license), © 2013 Yuxi (Evan) You, vendored under static/vendor/.

Uses drawdown (github.com/adamvleggett/drawdown, MIT license), © 2016 Adam Leggett, vendored under static/vendor/.

Site favicon from Fugue Icons, © 2010 Yusuke Kamiyamane, p.yusukekamiyamane.com.

License

The MIT License
Copyright © 2020 by Erki Suurjaak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.