Inspiration
Reddit communities are built on shared identity and recurring interaction, but most engagement is passive. Torchfall turns a subreddit into a living, breathing arena of strategy and survival. Because the game unfolds over multiple real-world days, the "hook" is biological: players wake up, check the post to see if they survived the night, play their daily 1-hour Phaser challenge to win immunity, and spend the day scheming, building alliances, and voting. If you can upvote a post, you can play.
What it does
Torchfall is a multi-day social elimination game that runs entirely inside a single Reddit post using Devvit’s custom post types. A moderator starts a game in one of two modes — Quick Demo or Full Game — and any redditor can join the tribe. The game cycles through phases automatically:
RECRUITING → CHALLENGE → VOTING → REVEAL → back to CHALLENGE
↘ ENDED (1 survivor left)
| Phase | Quick Demo (Judges' Mode) | Full Game (The Real Deal) |
|---|---|---|
| Recruiting | 15 minutes | 24 hours |
| Challenge | 5 minutes | 1 hour |
| Voting | 5 minutes | 23 hours |
| Reveal | 5 minutes | 5 minutes |
- Recruiting: Players join the tribe natively from the post.
- Challenge (Phaser-Powered): An immunity mini-game launches in a secure webview. The top scorers earn immunity from that day's vote.
- Voting: Tribal council. Tribemates vote to eliminate one of their own. Immune players are automatically greyed out.
- Reveal: The eliminated player's name is announced, ties are broken, and the next cycle begins automatically.
The Quick Demo compresses the cycle into under an hour so judges can experience the full game loop without waiting on real-world days.
How I built it
Torchfall runs across two environments communicating via postMessage:
- Devvit (Server-Side Redis State):
phases.tshandles automated transitions, vote tallying, and immunity logic. It reads durations from aPHASE_DURATIONStable keyed by the game mode so pacing is locked at game-start.GamePost.tsxrenders custom Blocks UI based on the current phase, backed by a client-side watchdog that nudges overdue phases forward if the scheduler experiences delays. - Phaser (Client-Side HTML5 Challenge): We utilized Phaser to build a highly responsive, tap-when-green reaction-time test in a sandboxed Devvit webview. Phaser allowed us to build a lightweight, high-performance web canvas that works flawlessly inside the native Reddit mobile app, ensuring a fair, millisecond-accurate playing field for immunity seekers.
Every phase transition is driven by a single recurring advance-phase-sweep scheduler job that ticks every minute, scanning the active Redis registry.
Challenges I ran into
- Scheduler Rate Limits: Our initial architecture scheduled a one-off Devvit job for every individual phase transition. Under load, this hit Reddit's scheduler rate limits, silently stalling games. We pivoted to a batch-sweep architecture: a single, recurring minute-interval job that scans all active games in Redis. This eliminated rate limits entirely and guaranteed game progression.
- Edge-Case Resilience: A social game falls apart if a mechanical error breaks player trust. We spent significant time hardening edge cases: resolving vote ties fairly, handling scenarios where only one player recruits, accommodating a mod who spectates without playing, and scaling down immunity slots gracefully in 2-player endgames.
Accomplishments I'm proud of
- True Cross-Platform Play: Successfully tested a full, multi-device loop (PC, iOS, and Android via the native Reddit app) end-to-end.
- Frictionless UI: Designed a voting interface that intuitively signals immunity (greyed-out, unclickable names) with zero clunky explanatory text.
- Designed for "Nobody Watching": Built a stateful, serverless game loop where correctness relies strictly on the Redis data model (
phaseEndsAttimestamps) rather than any client staying online.
What's next for Torchfall
- Subreddit Alliances: Introduce private messaging channels/alliances natively within the post to foster secret scheming.
Built With
- devvit
- gamedev
- javascript
- multiplayer
- phaser.js
- redis
- typescript
Log in or sign up for Devpost to join the conversation.