Inspiration 💡
Reddit is a platform built entirely around communities, but most games built for it are single-player experiences. We wanted to create a game that doesn't just exist on Reddit, but actively uses Reddit's core mechanics to bring subreddits together. Taking inspiration from massive multiplayer raid bosses in games like World of Warcraft or Destiny, we built a daily co-op experience tailored specifically for individual subreddits.
What it does ⚔️
Raid the Thread is a daily cooperative boss-battle game embedded directly into your subreddit.
Every day at midnight UTC, a new, uniquely generated boss attacks the subreddit. Players jump into the post and play a fast-paced bullet-hell avoidance mini-game to deal as much damage as they can before they die.
But you can't do it alone—the boss's health pool is massive. The damage you deal contributes to a global subreddit health bar. Your community must work together to bring the boss down to 0% before the day ends!
Community Hooks & Features:
- Automated Daily Posts: Powered by the Devvit Scheduler, the game automatically posts a new daily thread, pinning yesterday's top 3 MVPs in the comments.
- Live Comment Announcements: When a player beats the daily high score, our backend automatically posts a comment in the thread announcing their score and taunting the rest of the subreddit to beat it. This keeps the thread highly active and bumping in the Reddit algorithm!
- Call to Arms: A built-in recruitment button that allows players to instantly post a comment with their damage and the boss's current HP to rally more players to the cause.
- The Vault: Collect rare, randomized gems during your run that are permanently stored in your personal Vault.
How we built it 🏗️
The game is built using the Devvit platform, specifically leveraging the WebViews API.
- Frontend: The core game loop is built with Phaser.js for smooth, 60fps 2D rendering of the bullet-hell mechanics, bundled with Vite. The surrounding menus use Devvit's React-like UI components.
- Backend: We used Devvit's Node.js serverless environment.
- Database: Devvit's built-in Redis handles all state management, including the global boss HP, daily leaderboards, player streaks, and Vault inventories.
- Automation: We utilized the Devvit Scheduler to handle the cron jobs that generate and post the daily boss at midnight.
- Reddit API: We used the Reddit API wrappers provided by Devvit to allow the game to autonomously submit comments for high scores and "Call to Arms" recruitment.
AI Pair Programming 🤖
A significant part of this project's rapid development was made possible by AI pair programming (huge shoutout to Gemini/Claude!). While the creative vision, game design, UI layouts, and core mechanics were entirely our own, we heavily utilized AI as a collaborative coding partner. The AI helped us scaffold the boilerplate, translate our game design into Phaser.js code, and navigate the intricacies of the Devvit WebViews architecture. We acted as the creative directors and architects, while the AI acted as a tireless co-developer—allowing us to build a complex, multiplayer-synced bullet-hell game in a fraction of the time. It was a fantastic experience in human-AI collaboration!
Challenges we ran into 🧩
- Responsive Controls in an Iframe: Getting Phaser.js pointer tracking to feel smooth and responsive inside a Reddit iframe across both desktop (mouse) and mobile (touch) devices took significant iteration. We eventually moved away from virtual joysticks to a 1:1 screen-space tracking system.
- Serverless Concurrency: Managing the global boss HP in Redis when hundreds of players could potentially finish a raid at the exact same second required careful atomic operations to ensure no damage was lost.
- Scheduler Configurations: Migrating to the new Devvit Scheduler v1 schema for cron jobs was a learning curve, but essential for the fully automated daily loop.
Accomplishments that we're proud of 🏆
We are incredibly proud of the Live Comment Announcement system. Watching the game dynamically interact with the Reddit thread—taunting players and creating fierce competition in the comments without users having to type anything—feels like a truly native Reddit experience.
We're also proud of the deterministic daily boss generation, ensuring every player in the subreddit faces the exact same seed, enemy spawns, and bullet patterns on any given day.
What we learned 🧠
We learned a massive amount about the strict architectural separation between Devvit's server-side Redis environment and the client-side WebView iframe. We mastered bridging the gap using custom postMessage RPC calls to keep the game securely synced with the backend without exposing logic to the client.
What's next for Raid the Thread 🚀
- Cross-Subreddit Leaderboards: We want to add global tracking to see which subreddits defeat their bosses the fastest!
- Equippable Gear: Expanding the Vault so players can equip the rare gems they find to alter their movement speed or ultimate attack power.
- Boss Modifiers: Allowing the community to vote in the comments on "Curses" (like 2x enemy speed) for the next day's boss in exchange for higher gem drop rates.
Built With
- devvit
- node.js
- phaser.js
- react
- redis
- typescript
- vite
Log in or sign up for Devpost to join the conversation.