Inspiration

We've all been there - grinding LeetCode problems alone, wondering if there's a more engaging way to practice coding. Then it hit us: what if we combined the addictive chaos of Tetris 99's battle royale format with competitive programming? The result is Leet 99 - turning the solitary grind into a multiplayer showdown where your coding speed literally becomes a weapon against other players.

What it does

Leet 99 is a fast paced real-time battle royale where 2-99 players race to solve bite-sized coding problems. Each player has a "stack" of incoming problems - solve them to earn points and attack opponents with debuffs like Vim Lock (forces Vim mode), Flashbang (blindingly bright theme), or DDOS (disables the Run button). If your stack overflows from unsolved problems piling up, you're eliminated. Last coder standing wins!

Players can choose targeting modes (Random, Top Score, Near Death, or Attackers) and spend earned points in a shop to clear debuffs, skip problems, or slow down incoming problem rates.

How we built it

Frontend: Next.js with Tailwind CSS and daisyUI for a "riced workstation" aesthetic - dark, dense, and game-like Code Editor: Monaco Editor with monaco-vim for that authentic developer experience (and Vim Lock attacks!) Realtime: PartyKit handles WebSocket rooms, keeping all players in sync with authoritative server state Code Execution: Judge0 CE via RapidAPI runs Python submissions securely with hidden test validation Persistence: Supabase stores match results and powers the leaderboard Bots: Simulated bot players fill empty slots so demos always feel lively

Challenges we ran into

Realtime state synchronization: Keeping 8+ players' game states perfectly in sync while handling attacks, debuffs, and eliminations required careful event ordering and snapshot reconciliation Debuff interactions: Managing concurrent debuffs, grace periods, and edge cases (what happens if you get attacked while already under attack?) led to many whiteboard sessions Judge0 rate limits: RapidAPI quotas meant we had to implement smart caching and rate limiting to avoid burning through our allocation Monaco + Vim mode: Forcing Vim mode programmatically while respecting user preferences and not interfering with game hotkeys was trickier than expected Accomplishments that we're proud of A fully playable multiplayer game that actually feels intense and fun The stack overflow mechanic creates genuine tension - watching problems pile up is surprisingly stressful! Clean separation between contracts, realtime logic, and UI made parallel development possible Debuffs that are annoying enough to be impactful but not so frustrating that players rage-quit The "riced workstation" aesthetic that feels like a game, not a SaaS dashboard

What we learned

PartyKit is incredibly powerful for building realtime multiplayer experiences quickly Game feel matters more than feature count - tuning timers and intervals took multiple iterations Designing problems that are "fast to read, fast to solve" is harder than it sounds WebSocket state management requires a different mental model than REST APIs Vim users really do love being forced into Vim mode (and non-Vim users really do hate it - perfect for an attack!)

What's next for Leet 99 More languages: Support for JavaScript, TypeScript, and Go beyond just Python Ranked matchmaking: ELO-based ranking and competitive seasons Custom problem sets: Let users create themed rooms with their own curated problems LLM bots: AI opponents that actually write (sometimes buggy) code for a more realistic challenge Pair programming mode: 2v2v2v2 team battles where partners collaborate on solutions

Built With

  • judge0
  • next.js
  • partykit
  • supabase
Share this project:

Updates