Inspiration
Rhythm games are great at making you feel music, and fighting games make every input feel like an impact. We wanted both in a 30-second daily ritual that fits right in a Reddit feed: one song, everyone plays it, and every beat you land is a punch.
What it does
Bok Bok Brawl is a daily rhythm fighting game that lives inside a Reddit post.
- Every day there's a new, original 30-second track, and everyone plays the same one.
- Notes fall down three lanes. Tap a lane as its note reaches the line and the chicken attacks: left kicks, middle punches, right jabs. Every hit launches the note into the enemy.
- Timing grades (Perfect, Good, OK) and combos multiply your score.
- Miss a note and you take the hit. The track keeps playing, but the melody stumbles, so you hear every mistake.
- Each fight has three waves, and the last one is a boss.
- Your first run of the day is ranked on the daily leaderboard. Replays are for practice, and you can share your ranked result to the thread.
- A new post appears automatically every day. Older posts stay playable as archives, and if a day has no new track, a random rerun keeps the game going.
How we built it
- Platform: Devvit Web with a TypeScript client and server. A scheduler publishes each day's post at 00:00 UTC, and Redis stores runs, leaderboards and post-to-day bindings.
- Original music pipeline: each day's track is generated with Google Lyria. An offline Python pipeline:
- splits the track into stems with Demucs;
- beat-tracks it with librosa;
- transcribes the guitar lead with basic-pitch;
- charts the lead onto three lanes by pitch, thinning fast runs so they're playable on a phone.
Every chart is validated automatically and approved by ear in a preview tool.
- Audio engine: backing and lead stems play continuously on the Web Audio clock. A miss ducks and muffles just that one note. Input is judged on the same clock, with per-device latency calibration and decoder-offset alignment.
- Visuals: hand-drawn key poses generated with Nano Banana, cleaned and aligned by script, and rendered with PixiJS. Motion comes from code: anticipation, squash and stretch, hit-stop, knockback and a stepped "line boil" wobble.
- Fair play: every ranked run is re-scored on the server from its hit log, with run tokens and plausibility checks.
Challenges we ran into
- Making AI music playable. Generated audio has no note data, so we built a separate → transcribe → chart pipeline and tuned it: octave folding, thinning dense passages, and merging dropped notes' audio so the melody stays intact.
- Music that never breaks. Our first version silenced the melody on every miss, which sounded broken. Continuous stems with a per-note duck fixed it.
- Where the player looks. Six horizontal strings split attention between the notes and the fight, so nobody saw the chicken. We prototyped three layouts and landed on three vertical lanes, with each hit launching up into the arena.
- Timing on phones. Audio latency and decoder priming differ per device; the audio clock, calibration and onset alignment solved it.
- Reddit's webview: CSP-safe PixiJS, device-pixel-ratio rendering, and iOS silent-switch handling.
Accomplishments that we're proud of
- A fresh, original track every day, with an automated pipeline from generation to playable chart.
- Every input visibly causes a punch: the note you hit flies into the enemy.
- A daily loop that's honest (server-verified scores) and never goes dark (automatic reruns).
What we learned
- In rhythm games, where the player looks matters as much as the timing windows.
- Generated media needs a strong validation step. Our preview-and-approve gate caught every bad take.
What's next for Bok Bok Brawl
- More enemy types and bosses themed to each day's track.
- An optional hard mode with more lanes.
- Community-voted daily styles, like "spy jazz Tuesday".
AI and asset disclosure
Music is generated with Google Lyria (with an inaudible SynthID watermark). Character and FX art is generated with Nano Banana. No licensed songs are used. Fonts: Gochi Hand and Nunito (SIL Open Font License).
Built With
- basic-pitch
- demucs
- devvit
- google-lyria
- librosa
- nano-banana
- pixijs
- python
- redis
- typescript
- web-audio-api
