Beat Dash
A rhythm platformer built in Unreal Engine 5 and C++ where any song you choose becomes the level. A custom audio-analysis pipeline finds the beats in real time and builds a synced 3D platformer level around them — no two songs play the same.
Developer
2025 - Ongoing


BeatDash is built around a single design promise: the song is the level. The player searches for a track from inside the game, the audio is fetched over the network, and a hand-written DSP pipeline analyses the waveform to produce a timeline of beats. Those beats become the platforms. The player jumps between eight rotating faces of a tunnel, hitting each in time with the music. No level is hand-authored, and every system in the project exists to make that promise hold up.
The core is a from-scratch beat-detection pipeline written in C++: a Hann-windowed, radix-2 Cooley–Tukey FFT implemented in-place with bit-reversal, framed at a configurable FFT and hop size. Per frame it computes the positive spectral flux across a band-limited range (defaulting to 20–150 Hz to lock onto kicks and bass), smooths the result, and picks peaks against an adaptive threshold derived from the mean and standard deviation of the flux signal itself, so the detector calibrates to each individual song rather than relying on a fixed cutoff. Every parameter is exposed as an editor property for per-genre tuning.
Audio comes in through a unified runtime decoder: WAV via Unreal's wave parser, MP3 via dr_mp3, and M4A/AAC via miniaudio, all collapsing into a single normalised float buffer the rest of the engine never has to think about. Songs are searched and downloaded on demand through a custom HTTPS backend I built and host, which keeps the brittle YouTube-extraction logic server-side where it can be patched without shipping a client update. The HTTP layer is fully asynchronous, surfaces per-byte download progress, and runs an idle-timeout watchdog to cancel stalled downloads.
Gameplay is spline-driven rather than physics-driven. Every legal transition between the eight tunnel faces is a pre-baked cubic spline, and the character is interpolated along it over a fixed jump duration. Because platform spawning and jump duration share the same time base derived from the detected beats, every jump is mathematically guaranteed to coincide with a beat plane scrolling into position.
Doing real signal processing inside a game engine was the central challenge. Unreal ships DSP primitives but nothing that says "give me the beats of this song," so the entire pipeline is hand-built. Naive onset detection produces either a flood of false positives or misses entire choruses; getting it musically tight meant iterating on the band limits, smoothing kernel, and adaptive-threshold multipliers until detection aligned with what a human would tap. The second challenge was timing integrity: physics-based jumps drift the instant a player jumps on an unexpected frame, which destroys a rhythm game. The spline approach trades player freedom for mathematical precision, the cost being a combinatorial explosion of any-to-any transition splines, all generated at runtime from a single distance parameter so the geometry rescales cleanly. The third was decoupling: the audio pipeline, spline actor, platform spawner, character, and search UI all coordinate through a static delegate hub, so each subsystem depends only on the events it cares about and a new feature can subscribe without touching gameplay code.