Case study · Mobile

Ludic

Nine daily puzzles on one deterministic backend. Same seeds for everyone, fair leaderboards, and completions that survive a bad connection.

Unity 6 URP Cloudflare Workers D1 TypeScript
GitHub

A daily puzzle game for Android and iOS, built around a shared clock rather than an endless content treadmill.

Each day at midnight UTC, a Cloudflare Workers CRON generates three deterministic seeds via HMAC-SHA256, selects three random games from a pool of nine, and assigns them to all players. Same puzzles, same seed, fair leaderboards.

The client is built in Unity 6 with URP. Nine puzzle types share a consistent architecture: a Game class implementing IGame, a GridController for input and validation, GridUI for visuals, and SettingsSO ScriptableObjects for difficulty configuration.

Daily challenges, streaks and leaderboards on mobile.
  • Arrows — slide tiles toward the exit.
  • Hitori — eliminate duplicate numbers.
  • Kings — place pieces by region rules.
  • LineConnect — match endpoints into paths.
  • Pipes — rotate segments into a loop.
  • Shikaku — divide the grid into rectangles.
  • Sudoku — the classic number placement puzzle.
  • WordGrid — guess words from letter feedback.
  • WordSearch — find hidden words in a grid.

Every game follows the same contract, so adding a tenth puzzle means implementing one interface rather than inventing another mini-app.

A TypeScript Cloudflare Workers API backed by D1 (SQLite) handles Google Sign-In auth, daily challenge generation, completion submission, streak tracking, and per-slot leaderboards ranked by completion time.

The API is organised as single-file resource handlers with custom HMAC-based session tokens and CORS for all origins. Daily seeds are generated server-side, which keeps the challenge identical for every player and makes the leaderboard meaningful.

Cloudflare Workers D1 / SQLite HMAC-SHA256 Google Sign-In

DOTween handles animation, NiceVibrations provides haptic feedback, and UniTask keeps async flows readable. Google AdMob supplies rewarded ads, Google Sign-In handles authentication, and Lottie covers lightweight motion graphics.

Offline completions are queued and synced through a dedicated endpoint, so a lost connection does not cost a streak. A GitHub Actions workflow builds unsigned iOS IPAs on every push.

Status: the Play Store listing is pending approval. The App Store version requires an Apple Developer account renewal before publishing.