Skip to content
← Back

Mocard

Local multiplayer card game (LAN)

Experimental
Kotlin Jetpack Compose Material 3 Ktor Room Coil
Mocard

Mocard is a local multiplayer color card game, inspired by My Vote's architecture (embedded Ktor server + QR-code client). The host starts a WebSocket server on port 8766, generates a QR, and other players scan to join. All rules are configurable from settings: initial cards, +2/+4 stacking, "MONO" call, penalties, special restrictions. Even the image of EVERY card can be swapped from the gallery — gameplay is decoupled from artwork. Stack: Kotlin + Jetpack Compose, Ktor, Gson, ZXing (QR), Coil, Room.

Features

  • Embedded Ktor LAN server (host) — port 8766
  • QR join: client scans, done
  • mDNS discovery of the server on the network
  • Fully configurable rules (initial cards, stacking, MONO, ...)
  • Per-card image swap from gallery
  • Canonical state only on host, private hands per device
  • Game history (Room)
  • Foreground service to keep the connection alive

Configuration

  • Initial cards per player (1–15)
  • Special-card frequency: low / med / high
  • +2 on +2 / +4 on +4 / mixed stacking
  • Forgotten-MONO penalty (card count)
  • +4 restriction (only if you don't have the color)
  • Match-winning score
  • Deck composition (colors, number range, duplicates)

Technical prerequisites

  • Android 8.0+ (API 26)
  • 2+ devices on the same Wi-Fi network
  • Permissions: Wi-Fi state, Camera (QR), Photos (card images)
  • ~80 MB storage
Coming soon