Games
Ψηφίδες (Psifides) — a multiplayer tile-laying board game for Connect Cafe
An original tile-laying board game in the Carcassonne family, built for Connect Cafe on webcafe.gr: 1–6 players, people or bots, playing live or asynchronously with turn deadlines. The rules engine is deterministic and runs in every browser; the server stores only seeds and moves, and replays a whole match in a sandbox before it touches the leaderboard. The mosaic art is generated in code, with no image assets. First commit to launch in three days.
JavaScript (vanilla) Canvas 2D TypeScript Node.js Fastify Socket.IO PostgreSQL Worker threads Docker Caddy
Key Features
- Original rules: 79 tiles in 30 kinds (roads, villages with wells, fields, windmills, sanctuaries, healing temples, oracles, mines), 9 villagers per player, a talents economy with shops that collect rent
- Deterministic rules engine shared by every client: the server stores the seed, seats and a move list (UNIQUE per match, seat and turn), and each browser replays it to rebuild the game
- Feature tracking with union-find (path compression) over 12 edge points per tile, plus an open-edge count per region to detect completed roads and villages
- Server-side replay for the leaderboard: the finished match is re-run in a worker thread inside a vm sandbox (20 s, 192 MB budget) and only then written to the scores; bot seats never score and a match can't pay twice
- Asynchronous play: turn deadlines from 2 minutes to 2 days, a bot that covers a late player (and keeps the seat after 3 misses), a rate-limited nudge, and a “your turn” badge in the lobby
- Greedy deterministic bots that evaluate every legal placement and villager on a light copy of the regions
- Procedural mosaic renderer on Canvas 2D: each tile is painted, sampled into a 24×24 grid and snapped to an 18-colour ancient-floor palette, with finer stones for buildings, a fixed salt per tile and a cache per kind and rotation
- Real-time lobby and match updates over Socket.IO with a 20 s polling fallback; table chat with whispers, the café word filter, blocks and per-message reporting; one-click rematch
Challenges Overcome
- Keeping the game fair while all logic runs client-side: the fix is a deterministic engine plus a sandboxed server replay before any score is recorded (the draw pile is still readable in dev tools, a documented known gap)
- Making asynchronous turns feel alive: deadlines, bot stand-ins and nudges, so a game between busy friends never stalls
- Getting a hand-made mosaic look from pure code, fast enough for old laptops and phones, with no framework and no image assets
- Shipping from first commit (27 Sep 2026) to a public launch (29 Sep 2026) on top of shared match plumbing reused by the other Connect Cafe games
Results & Impact
Live on connect.webcafe.gr since 29 September 2026, marked “in progress” while players send feedback
1–6 players, human or bot, on phone, tablet and desktop
46 engine tests covering tile counts, rotations, scoring and replays, run in the server test suite
Joins a platform of more than a dozen games, including backgammon, chess, birimba, poker and the party games, in a codebase of 170+ commits since August 2026