Skip to content

gavinhaggis/ms-app

Repository files navigation

Medieval Solutions

A local-network party card game of absurd medieval problems and even more absurd solutions.

One player is the Troubler — they draw a card, narrate the trouble afflicting their town, and judge the council's responses. The rest are Noble Councillors — each secretly picks two cards from their hand as a solution, then reveals and argues their case. Best solution wins a point. Roles rotate.

Runs as a small Python web server. Players join from their own phones over WiFi. A separate host screen (TV/projector) shows the trouble card and live scoreboard.


Quick Start — Mac

Double-click start.command in Finder. It will:

  • Start the server on port 5001
  • Print the local IP address for players to join
  • Wipe the database for a fresh game

Or from terminal:

pip install -r requirements.txt
python3 app.py

Then open http://localhost:5001/admin to control the game, and http://localhost:5001/host on a TV or second screen.


Quick Start — Android (Termux)

One-time setup:

pkg install git -y && ([ -d ~/ms-app ] && git -C ~/ms-app pull || git clone https://github.com/gavinhaggis/ms-app.git ~/ms-app) && sh ~/ms-app/android-setup.sh

This installs Python, Flask, git, and creates home screen widget shortcuts.

After setup:

  • Install Termux:Widget from F-Droid
  • Long-press home screen → Widgets → Termux:Widget
  • Use the Start Medieval Solutions / Stop Medieval Solutions buttons

Or run directly from Termux:

sh ~/ms-app/android-start.sh

Requirements

  • Python 3.8+
  • flask>=3.0 (see requirements.txt)
  • A modern browser on each player's device (Safari, Chrome, Firefox)
  • All devices on the same WiFi network

Scripts

File Platform Purpose
start.command Mac Double-click to start (wipes DB for fresh game)
stop.command Mac Double-click to stop server
restart.command Mac Double-click to restart server (preserves DB)
android-setup.sh Android One-time Termux setup + widget shortcuts
android-start.sh Android Start server with wakelock
android-stop.sh Android Stop server and release wakelock

Admin & Host

  • Admin panel: http://[ip]:5001/admin — start/stop game, load test scenarios, force phase
  • Host screen: http://[ip]:5001/host — put this on a TV or projector
  • Default admin password: set on first visit (stored in DB)

Project Structure

ms-app/
├── app.py              # Flask server — all routes, SSE, game logic
├── config_db.py        # SQLite schema and helpers
├── cards.json          # 247 cards, 6 languages (en/de/fi/fr/es/sco)
├── requirements.txt
├── static/
│   ├── art/            # Card art PNGs (pixel art, served via /art/<name>)
│   ├── img/            # UI images: card backs, logo, rules
│   ├── css/            # tokens.css, game.css, host.css
│   ├── font/           # mavsmooth.ttf, pangolin.woff2
│   ├── js/             # qrcode.min.js (local, no CDN)
│   └── sfx/            # Sound effects
└── templates/
    ├── index.html      # Player SPA (all game views)
    ├── host.html       # TV/projector screen
    ├── admin.html      # Admin control panel
    └── admin_login.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors