/BandcampRevolution

A bookmarklet that lets you play DDR on Bandcamp

Primary LanguageJavaScriptDo What The F*ck You Want To Public LicenseWTFPL

BandcampRevolution

A bookmarklet that lets you play DDR on Bandcamp

Screenshot

Play

Go here for instructions and to get the bookmarket.

How it works

The game pretty much hijacks Bandcamp's page. Once you click the bookmarklet, it waits for music to start playing. After the music is played, the game takes control of that audio element. It makes a second, silent copy that is used to generate the arrows. The arrows are generated by doing beat detection on the silent copy. Although The beat detection algorithm is really naive and needs work.

###The Bookmarklet

When you click on the bookmarklet, this code is executed:

(function () {
	if (window.bandCampRevolution) {
		bandCampRevolution(1);
	} else {
		var cachebuster = Math.round(new Date().getTime() / 1); 
		var jsCode = document.createElement('script'); 
		jsCode.setAttribute('src', '//rawgit.com/docmarionum1/BandcampRevolution/master/bcr.js?cb=' + cachebuster);
		document.body.appendChild(jsCode);
		jsCode.onload = function() {bandCampRevolution(1);};
	}
}());

bandCampRevolution is a function that takes a single parameter from 0 to 3 representing the difficulty. 1 is normal.