Inspiration
The Daily Throne was inspired by social experiments like "The Button" on Reddit and "King of the Hill" games. We wanted to create a simple yet addictive experience where the entire community competes for a single prize: the throne. The concept explores human psychology around status, competition, and FOMO (fear of missing out). We asked ourselves: "What if only ONE person could be King at a time, and anyone could steal it instantly?"
What it does
The Daily Throne is a real-time social competition game where only one user can sit on the throne at any given moment. Players click the "⚔️ USURP THE THRONE ⚔️" button to become the new King, instantly dethroning the previous ruler. The game displays the current King's username and tracks their reign duration in real-time (updating every second). A daily leaderboard shows who held the throne the longest each day, creating ongoing competition. The game features a premium dark gold and black UI that makes players feel like royalty.
How we built it
We built The Daily Throne using Reddit's Devvit platform with TypeScript and React (TSX). The core architecture uses Redis for real-time state management, storing the current King's username, reign start time, and daily records. We implemented useInterval hooks for live timer updates (1-second refresh rate) and useAsync for efficient data fetching. The UI leverages Devvit's component system (vstack, zstack, text, button) to create a responsive, mobile-friendly interface. We configured the app with redditAPI, redis, and realtime capabilities to ensure instant updates across all users. The usurp mechanic updates Redis atomically, calculates reign durations, and updates daily leaderboards automatically.
Challenges we ran into
The biggest challenge was ensuring real-time synchronization across multiple users. We had to carefully manage state updates to prevent race conditions when multiple users try to usurp simultaneously. Handling edge cases like logged-out users and null states required defensive programming. We also faced TypeScript strict mode errors that needed proper type handling for optional values. Optimizing the timer to update every second without causing performance issues required careful use of React hooks. Finally, making the UI self-explanatory for judges while keeping it visually clean was a design challenge we solved through iterative refinement.
Accomplishments that we're proud of
We're incredibly proud of creating a fully functional, bug-free game in under 24 hours with zero prior Devvit experience. The real-time updates work flawlessly, and the UI looks professional and polished. We successfully implemented a viral mechanic that naturally encourages repeat engagement - players keep coming back to check if they're still King. The code is clean with zero diagnostic errors, and the game handles all edge cases gracefully. Most importantly, the game requires zero learning curve - anyone can understand and play it instantly, which is perfect for community engagement.
What we learned
This hackathon taught us the power of Reddit's Devvit platform for building interactive community experiences. We learned how to use Redis for real-time state management, implement React hooks in a constrained environment, and design for viral engagement. We discovered that simplicity is key - the most engaging games have one clear mechanic that everyone understands immediately. We also learned the importance of defensive programming when dealing with real-time multiplayer interactions. Finally, we gained experience in rapid prototyping and shipping a complete product under tight deadlines.
What's next for The Daily Throne
We plan to add several exciting features: weekly and all-time leaderboards, achievement badges for milestone reigns (1 hour, 1 day, etc.), throne defense notifications so Kings can protect their reign, customizable throne themes that Kings can unlock, and a "Throne History" showing the timeline of all rulers. We also want to implement a "Coup" mechanic where multiple users can team up to overthrow a long-reigning King. For monetization, we're considering Reddit Gold integration where premium users get special throne skins. Finally, we want to expand to multiple subreddits and create a global "King of Kings" leaderboard across all communities.
Built With
- devvit
- javascript
- node.js
- react
- real-time
- redis
- tsx
- typescript
Log in or sign up for Devpost to join the conversation.