The Daily Realm

Each day a new Royal Decree puts your kingdom's fate to a community vote — and a living, tappable castle world reacts to every choice, dragon and all.

Grand castle & community voting

Inspiration

Reddit communities thrive on daily rituals and shared stories. I wanted to fuse the two: a daily civic decision the whole community makes together, wrapped in a kingdom that visibly lives and breathes based on those choices. Not a static poll — a world you watch change, and want to return to every day.

What it does

The Daily Realm posts a fresh Royal Decree every day — a dilemma facing the kingdom. The community votes on one of three responses, and every vote shifts four vital stats: 🌾 Food, 🎪 Morale, 🪙 Coin, and 🐺 Danger. The hand-drawn kingdom reacts in real time:

  • Skies shift from clear → gloomy → stormy, with rain, stars, and a moon
  • Crops grow, castle windows light up, and the royal banner flies when the realm prospers
  • Wolves prowl the gates and ravens circle when danger climbs
  • A fire-breathing dragon periodically soars across the sky

It's also a children's-book lesson in castle architecture. Tap the portcullis, drawbridge, battlements, machicolations, trebuchet, signal beacon, or arrow slits — each plays a defensive animation and teaches a real fact about how medieval castles worked. Tap the villagers, scatter the birds, scare off the wolves, or poke the dragon to make it breathe fire.

Vote daily to build a 🔥 streak and climb from Peasant to Sovereign. A Chronicle records every past day, and a Weekly Council leaderboard ranks the community's most active advisors.

A living kingdom

How I built it

  • Reddit's Devvit platform, with a hybrid rendering architecture: a Phaser 3 canvas draws the animated kingdom illustration, while all UI text lives in a crisp HTML/CSS DOM overlay on top — so it stays razor-sharp at every resolution and view mode.
  • tRPC + Hono for a type-safe client/server, and Redis for all persistence (votes, stats, streaks, chronicle, leaderboard).
  • A scheduler posts a fresh decree daily; decrees are deterministically seeded by date so the whole community gets the same dilemma.
  • A headless screenshot harness (Playwright) renders the real scene with mock data to capture marketing stills.

Challenges I ran into

  • Pixelated canvas text. Originally all UI was drawn inside the Phaser canvas and blurred when scaled. I re-architected it to render the kingdom in the canvas and the UI as DOM — sharp everywhere.
  • The castle hiding behind the panel on mobile. The scene measured its layout a beat too early; a ResizeObserver plus scale-to-fit logic guarantees the full castle always fits the visible band.
  • Accessibility. I reworked the palette to a colorblind-safe set (teal / reddish-purple / amber / vermillion) with redundant icon + number + bar coding, high contrast, and a reduced-motion mode.

Accomplishments that I'm proud of

  • A genuinely living scene with meaningful, interactive, educational detail — not just a poll with art.
  • Crisp, fully accessible UI without sacrificing the rich animated visuals.

What I learned

  • Hybrid canvas + DOM is the sweet spot for game-like Reddit apps: expressive visuals and crisp, accessible text.
  • Small interactive touches (a tappable trebuchet, a dragon overhead) dramatically raise stickiness — people click around just to see what happens.

What's next for The Daily Realm

  • More decree variety and seasonal events
  • Kingdom cosmetics and milestone rewards
  • Community-authored decrees

The realm in crisis

Built With

devvit · typescript · phaser · react · trpc · hono · redis · reddit

Built With

Share this project:

Updates