The music drives everything
Your track is analysed for its real beat grid, and the character’s dance is locked to the audio playhead — so it can’t drift, and it doesn’t depend on frame rate.
Rhythm is the combat system
Load a track from your device and the character dances to it. The beat is analysed up front, the whole arena pulses on the pulse, and every attack you throw is a dance move — land it in time with the music and it becomes a PERFECT hit worth 60% extra damage.
Free & fully offline — nothing to install. The Android .apk is sideload-only (allow installs from unknown sources).
Why it slaps
Six things that make Dance Fight what it is — all straight from the game.
Your track is analysed for its real beat grid, and the character’s dance is locked to the audio playhead — so it can’t drift, and it doesn’t depend on frame rate.
Arm Wave, Spinning Kick, Body-Roll Uppercut and a 720° Body-Roll Finisher. Spins are real rotations, not pose swaps.
Attack poses are layered over the ongoing groove rather than replacing it — so the character keeps moving while it fights.
Moves landed on the beat hit 60% harder and build a bigger combo. Shuffle-stepping in time charges your finisher meter.
Play on a desktop keyboard, or use the on-screen controls that appear automatically on phones. Rotate to landscape for the full arena.
The whole game is a single HTML file (~78 KB). No framework, no bundler, no CDN. It works offline and even from file://.
How it works
Pick an audio file, or just press Start and it plays a default 128 BPM groove.
| A D | Shuffle step Dance-walk. Stepping in time charges your finisher meter. |
| W | Leap Arabesque. |
| S | Dip Guards and dodges — hold to block. |
| J | Arm Wave Fast, low damage. |
| K | Spinning Kick Medium — a full 360° turn. |
| L | Body-Roll Uppercut Heavy — rolls through a full turn. |
| SPACE | Body-Roll Finisher Needs a full meter — a 720° spin. |
| P | Pause / resume music Stop the track, keep the fight. |
Under the hood
Polling an AnalyserNode every frame ties beat detection to the render frame rate, which falls apart on a slow device. Dance Fight does it offline instead, on the decoded audio buffer, before the fight starts.
The result is a beat grid. During play the dance phase is read straight off the audio playhead — (playhead − phase) / period — so the groove cannot drift, and it is completely independent of frame rate.
Everything else is drawn on a forward-kinematic skeleton. Moves are keyframed joint angles blended over the ongoing dance groove rather than replacing it. Spins are faked as a horizontal squash that mirrors past 90°, with near and far limbs swapping, and every attack leaves additive ghost trails of the last few poses — which is what makes a rotation read as motion.
See it move
One HTML file, a wide arena, and a character that never stops dancing. Tap through to play it live in your browser.
Get started
No toolchain, no install, no server. Just open it — or clone it and remix.
Open the live demo, pick a track, and fight. Browsers block audio until you interact, so your first tap or click unlocks sound.
# clone and open $ git clone https://github.com/drsamonline/dance-fight.git $ cd dance-fight $ open index.html # macOS; xdg-open / start elsewhere # or serve it $ python3 -m http.server 8000 # then visit http://localhost:8000
Good questions
No. Dance Fight is a single HTML file with zero dependencies — no build step, no framework, no CDN. Open it in a modern browser and play, and it works offline and from file:// too.
Yes. Load an audio file from your device and the game analyses it for its real beat grid. If you just want to start, press Start and it plays a default 128 BPM groove.
Browsers block audio until you interact with the page, so your first tap or click unlocks sound. If you ever hear nothing, a live level meter under the BPM readout shows whether audio is actually flowing — and a banner appears if it isn’t. That meter reads real signal, not a flag.
A move thrown within about 80 ms of a beat lands as a PERFECT: 1.6× damage and a bigger combo multiplier. The gold · ON BEAT tag on the move name tells you when you nailed it. Shuffle-stepping in time charges your finisher meter.
Yes — on-screen controls appear automatically. Hold a direction with one thumb and tap attacks with the other. The arena is 16:9, so rotate to landscape; it’s playable in portrait but cramped.
No. Beat detection is done offline on the decoded audio buffer, and during play the dance phase is read straight off the audio playhead — so the groove can’t drift and is independent of frame rate. One honest caveat: the geometry, timing and beat grid were verified programmatically, but the feel of the spins and trails in motion was only tested in a headless browser rendering a few frames per second — that part is the player’s call.
Absolutely. It’s MIT licensed © Dr Sohil Momin. It’s a single HTML file, so fork it, remix it, and drop your own track in.