🎯 Inspiration

Reddit is built around collective decisions — upvotes, polls, and hive-mind threads. We wanted to explore what happens when that collective energy doesn't just surround a game — it determines what the game becomes next.

So we took Sokoban, the timeless block-pushing puzzle, and gave it a community hook: every day, players solve a word puzzle, eligible finishers nominate new words, and the community votes on the word everyone will play tomorrow.

The game feeds itself, one day at a time.

🧩 What it does

Sokoban Letters is a daily, community-driven Sokoban word puzzle that lives inside a Reddit post:

  • Solve — push letter blocks onto their matching targets to spell the day's word. Play with a keyboard or touch controls, with deadlock detection, undo, and reset.
  • Compete — complete the puzzle and join the daily leaderboard, ranked by move count first and server-measured time second.
  • Nominate — the first ten players to finish earn the right to nominate one word for tomorrow's puzzle.
  • Stay safe — every nomination is normalized, validated against the community's active-language dictionary, and screened against English, French, and custom blocklists before it can enter the vote.
  • Vote — every player gets one secret vote per day for their favorite nomination.
  • Rollover — at 00:00 UTC, the winning word is transformed into a new solvable puzzle, the results are published back to Reddit, and the community loop begins again.

Every day is shaped by the community, because players decide what tomorrow's puzzle will be.

🛠️ How we built it

Sokoban Letters was designed as a Reddit-native community game. It is built on Reddit's Devvit Web platform with a layered architecture that keeps the game rules independent from the platform:

  • Pure domain core (TypeScript) — the Sokoban engine, level generator, and solver form a zero-dependency domain layer, isolated from Reddit, React, and Phaser. This keeps the game rules deterministic, portable, and fully testable.
  • Server — a Hono REST API running in Devvit's serverless environment, with Redis as the single source of truth. Every submitted move sequence is replayed server-side before its score is accepted — the client is never trusted.
  • Client — React powers the application shell and community screens, while Phaser 3 renders the interactive board, touch controls, movement, and visual feedback.
  • State management — the Phaser scene emits only discrete player intents (UP, DOWN, LEFT, RIGHT, UNDO, and RESET). Canonical game state remains outside the renderer, preventing synchronization issues between React, Phaser, and the server.
  • Daily rollover — a scheduled, idempotent job closes voting, selects the winner, generates and solves the next puzzle, prepares the next voting slate, and publishes the result. A retry can resume safely without duplicating or corrupting a day.

🧗 Challenges we ran into

  • Trusting nothing from the client. A puzzle with a competitive leaderboard can attract cheating. We solved this by replaying every submitted move sequence on the server against the canonical engine. A run only counts if it actually solves the current puzzle. Time is measured server-side from the first accepted move and is never supplied by the client.
  • Keeping community contributions safe. User-generated words need guardrails before they can shape tomorrow's puzzle. Our server-side moderation pipeline normalizes case and accents, enforces a 4–10 letter format, validates each nomination against the active English or French dictionary, and rejects blocklisted words before they reach the ballot.
  • Making the rollover resilient. The entire game depends on one daily handoff. We built the rollover around a Redis state record with independently tracked steps, allowing an interrupted execution to resume exactly where it stopped.
  • Never showing an empty game. Each new voting slate starts with exactly 10 safe, auto-generated fallback words. Player nominations progressively replace them, but there is always something to vote for and always a puzzle to generate — even on the first day.
  • Fitting a complete puzzle into a Reddit webview. The interface remains playable down to 375px, while expensive level generation and solving stay outside interactive request paths to respect Devvit's execution limits.

📚 What we learned

  • Designing under the assumption that the client can be tampered with is easier and safer than adding anti-cheat protections later.
  • Community-generated gameplay needs moderation, validation, and reliable fallbacks from the beginning.
  • Idempotency is essential for scheduled jobs — it is the difference between a game that can recover automatically and one that silently corrupts its daily cycle.
  • A framework-independent domain core makes complex game logic easier to test, reason about, and integrate with Reddit.
  • Phaser works best as a focused rendering and input layer when canonical state remains outside the scene.

🚀 What's next

The hackathon is only the beginning. Our goal is to grow Sokoban Letters into a lasting Reddit-native game, shaped by the communities that play it.

  • Curated and AI-assisted themed word packs.
  • Streaks, seasons, and per-subreddit themes.
  • Richer board animations and daily reveal moments.
  • More community progression and long-term collaborative goals.

Sokoban Letters — the community writes the game, one day at a time.

Built With

Share this project:

Updates

Submission history