Inspiration

Reddit communities generate massive engagement every day — thousands of upvotes, comments, and reactions — but that energy disappears into passive metrics.

We asked a simple question:

What if Reddit engagement became a shared, visible goal?

KarmaFoundry was inspired by cooperative boss battles in games, where every small action contributes to a larger collective victory. Instead of isolating engagement, we turned it into a daily community-powered event.


What it does

KarmaFoundry transforms Reddit engagement into a daily cooperative boss battle.

  • Upvotes + comments generate shared energy
  • Energy reduces Boss HP
  • Downvotes create pressure (net negative impact, capped)
  • A daily vote activates a temporary multiplier
  • When energy reaches 10,000 → the boss is defeated
  • Members can claim once per day
  • Everything resets at 00:00 UTC

The result: passive engagement becomes an active, shared goal.


How we built it

KarmaFoundry is built using Devvit 0.12 Web with a modern client/server architecture.

Backend

  • reddit.getPostById() polls post stats every 10 seconds
  • Delta-based calculation (only new comments/upvotes generate energy)
  • Anti-spam caps (100 comments / 200 upvotes per poll)
  • Net downvote pressure with safety caps
  • All state stored in Reddit KV (KF:v1 namespace)
  • Daily reset logic at 00:00 UTC

Frontend

  • React (Vite) client
  • Glass morphism UI with CSS design tokens
  • Real-time progress bars (Energy + Boss HP)
  • Mod-only Demo Mode (cooldown + daily cap)
  • Transparent Audit panel (poll intervals, caps, multipliers, event log)

Animation

  • GameMaker HTML5 export embedded via iframe
  • postMessage bridge for:
    • CINEMATIC_START
    • CINEMATIC_VICTORY
    • CINEMATIC_END
  • Screen shake + victory overlay sequence

This is fully wired to real Reddit engagement — not a mock.


Challenges we ran into

1. Reliable delta tracking

Reddit exposes aggregate stats, not event streams.
We implemented cursor-based delta tracking to ensure only new activity generates energy.

2. Anti-spam protection

Without caps, one viral burst could instantly complete the goal.
We introduced per-poll caps and multiplier limits to maintain balance.

3. Demo safety

Judges need a repeatable demo.
We built a mod-only Demo Mode with cooldown and daily cap, clearly labeled to prevent manipulation concerns.

4. Daily reset correctness

Time zone handling required strict UTC-based resets to avoid inconsistent states.


Accomplishments that we're proud of

  • Real-time Reddit engagement integration
  • Fully transparent Audit panel
  • Production-minded anti-spam safeguards
  • Daily reset system with KV isolation
  • Victory cinematic with animation trigger
  • Mod-safe demo mode with cooldown + cap
  • Clean, mobile-responsive UI

Most importantly:
We turned passive Reddit activity into a shared daily win.


What we learned

  • Devvit 0.12 enables clean client/server separation
  • Poll-based engagement systems require strong guardrails
  • Transparency builds trust — especially in community games
  • Clear UX explanations dramatically improve judge clarity
  • Emotional payoff (cinematic win moment) matters

We learned that community mechanics must be:

  • Fair
  • Visible
  • Repeatable
  • Trustworthy

What's next for KarmaFoundry — Daily Reddit Boss Battle

Future directions:

  • Cross-post cooperative events between subreddits
  • Weekly mega-boss events
  • Community unlock tiers
  • Cosmetic upgrades earned by participation
  • Dynamic boss personalities per subreddit theme
  • Real-time WebSocket support if Devvit expands streaming APIs

KarmaFoundry can evolve into a reusable engagement engine for Reddit communities.


KarmaFoundry turns passive engagement into shared momentum — inside Reddit.

Built With

  • css
  • devvit-0.12-web
  • gamemaker-studio-(html5)
  • postmessage
  • react
  • reddit-developer-platform
  • reddit-kv-storage
  • reddit-post-api
  • typescript
  • vite
Share this project:

Updates