chandima
← all projects / 03

omi

Sri Lanka's four-player card game, playable from a link. Make a table, share it, and friends or bots take the other seats.

[ open playomi.app ↗ ]
The Omi home screen: a fan of five ornate playing cards beside a panel to create a table or join one with a code.
role
architecture · design · code
scope
realtime multiplayer game
year
2026

typescript · websockets · edge rooms · canvas

telemetry // numbers sample telemetry · replace with live feed
turn tick p50
22ms
authoritative ws room
reconnect sync
380ms
4g → wi-fi hand replay
peak tables
1.4k
concurrent 4-seat rooms
link to deal
3.2s
zero sign-up friction

trick turn latency & mobile reconnect

32-card hand · network switch recovered mid-trick without stall

ws turn rtt bot decision
120ms 60ms 0ms t1 t2 t3 drop t5 t6 t8 snapshot replay 380ms

seat reliability budget

  • guest link joins 91%
  • mobile sessions 78%
  • clean reconnects 99.4%
  • bot takeover 100%

authoritative edge table & bot takeover

share link → stateful edge room → trick validator + bot ai → 4 seats

join move 22ms reconnect seat empty [01] invite url zero-auth guest token [02] edge room do single-writer ws hub [03] trick engine hidden hands + trump [04] 4 seats delta sync [05a] snapshot replay resumes dropped 4g [05b] card-tracking bots suit + trump heuristics

01 / context

Omi is a four-player trick-taking game played across Sri Lanka at kitchen tables and late nights. Every online version either buried the game behind sign-up walls or broke the moment one player switched networks on mobile.

The goal was a table you can spin up in one tap, drop into a group chat as a link, and start playing in seconds — with responsive bots filling empty seats or taking over if someone drops.

02 / architecture

Each table runs as an authoritative state machine holding deck shuffles, trump selection, turn timers, and trick resolution. Clients never see cards they do not hold; every event is validated server-side before broadcast.

Reconnects replay the compact table snapshot so a flaky connection on mobile returns cleanly to the active hand without stalling three other players.

  • authoritative trick & trump state machine per room
  • instant invite codes and zero-account guest seats
  • bot players that follow suit, track trumps, and fill dropouts

03 / craft

Card games live or die on rhythm. Card fan angles, deal cadence, trump reveal, and trick sweeps were tuned so the table reads at a glance on a phone held in one hand.

Custom playing-card geometry and restrained monochrome contrast keep attention on the four cards on the felt rather than chrome around them.

04 / outcome

Live at playomi.app: four-player games start from a single shared URL with no mandatory install, working smoothly across desktop browsers and mobile connections.