Diamond EdgeCutting edge. Rock solid.

Case study · Diamond Tabletop

Real-time play across phones that survives a dropped connection

Diamond Tabletop is eight card and board games for Android and iOS, with bots for empty seats and live multiplayer between any mix of phones. Behind it are one phone acting as the authority, a server I built and run, and game rules that update without an app release.

The brief

What I built

  1. One device as the source of truth. One phone runs the rules and broadcasts the state; the others send input and draw what changed. The host is elected by measuring each phone's connection, and the same rule re-elects mid-game.
  2. Recovery as a designed feature, not an afterthought. When the host's connection comes back, it re-sends the whole table. A player whose app was killed can reopen it, enter the room code and be told which seat is theirs. Reconnecting through a server restart is proven in CI against the real server. A full game has been played across networks, a desktop on a LAN against a phone on cellular, through backgrounding and airplane-mode reconnects.
  3. The server. A Ktor relay and signalling service over WebSockets, with public and private rooms, and optional accounts on Postgres. Deployed and running at relay.diamondtabletop.com.
  4. Content as data. Each game's rules are a script, and its board layout and house rules are data in the same bundle. The app downloads its whole library from a published catalog, checking every file against its SHA-256 hash, so a new game or a rules fix needs no release.
  5. Release. Both stores, with an App Store build anyone can reproduce from the repository and store screenshots produced by the build.

A release decision

The desktop app builds, runs, hosts games and has a working installer. I still didn't ship it. A desktop app with no store has no auto-update, so every install would become a permanently out-of-date client talking to a server and a catalog that keep moving. Android and iOS launched; desktop stayed a development and test target.

Every platform you ship is a platform you support for years. Part of my job is telling you which ones aren't worth it yet, and why.

What this could look like for you

Its sibling app

Napkin Scores, a score pad for card nights, is built on the same shared modules and brings players to Diamond Tabletop. Read its case study.

Have a connection that has to hold up?

Tell me the date you're working against. Thirty minutes, technical, no deck.