Inspiration
What if the music you play could literally save a planet? Most rhythm games are disconnected from any stakes — you tap, you score, you move on. We wanted to build something where every beat matters, where missing a note has real consequences you can see and feel in real time.
Solar flares, meteorites, a planet in danger — the universe gave us the perfect villain. Your rhythm is the only shield between Earth and destruction.
What it does
PlanetBeat is a daily rhythm game embedded directly inside Reddit via Devvit. A 3D planet floats in space, surrounded by a glowing hexagonal energy shield. Solar flares fly in from every direction.
- Beat rings travel inward from deep space toward 4 lane markers (up, right, down, left). Hit them in time to power the shield.
- PERFECT hits recharge the shield. MISS = the shield weakens and a solar flare breaks through.
- When the shield fails completely, flares hit the planet directly — you watch it take damage in real time with a red emissive glow.
- At the end, the planet condition tells your story: Safe, Scarred, Damaged, or Exposed.
- 10 difficulty levels with progressive BPM, note density, and timing windows — from Rookie to Legend.
- Custom music upload: play any song from your device and the rhythm pattern syncs to the selected level BPM.
- Every day has a unique pattern seeded by the date — same challenge worldwide, compete with the whole Reddit community.
How we built it
The game runs entirely client-side inside a Reddit custom post built with Devvit. No external servers for the game logic — just a Three.js 3D scene rendered on a canvas, a Web Audio API synth engine for zero-latency procedural sounds, and a deterministic PRNG so every player gets the same daily challenge.
The shield system links rhythm and survival directly — there is no abstract health bar, the visual shield IS the feedback. When it flickers orange and the wireframe dims, you feel the urgency without reading any text.
The level system uses a minimum-gap pattern generator that ensures notes never cluster from multiple directions simultaneously at lower difficulties, while higher levels introduce tighter spacing and faster BPM for experienced players.
Challenges
- Audio timing on mobile: Web Audio API scheduling vs requestAnimationFrame drift required a dual-clock system using AudioContext clock for scheduling and rAF for visuals.
- Devvit sandboxing: the Reddit iframe environment has strict CSP and no persistent filesystem — all assets are bundled and all state lives in Redis.
- Feel over precision: tuning the shield flash, planet damage tint, and flare travel speed so the game feels cinematic without being distracting took many iterations.
- Custom audio sync: reading user audio files via FileReader and playing them through AudioContext while keeping the rhythm pattern independent of the actual audio duration.
What's next
- Level progression with persistent unlock system via Reddit username stored in Redis
- Community leaderboard per day and per level
- Different planet skins earned by grade streaks
- Multiplayer shield — two players defend the same planet
Built With
- css3
- devvit
- html5
- redis
- three.js
- typescript
- vite
- web-audio-api
Log in or sign up for Devpost to join the conversation.