Back to Projects Portfolio

Clicky - Rhythm Based Game

I've always been interesting in rythmn based games, however was never great at understanding whether existing game developers detected the beats themselves, or wrote a script to do it for them.
I decided to do the latter a few years ago, and found some nice javascript, I can no longer remember what it was called.

I then backed up my portfolio (including the game) when I cancelled my old hosting service. Those file are probably still around somewhere, I have just been unable to find them.
Around October 2017, I decided it would be fun to start on this project again. First I did some research of how to detect the beats, and found stasilo/BeatDetector on GitHub. Using this, I can generate a json array of beats, with an interval of 10ms, in hoped of detecting the beats, but never detecting the same beat twice.

I still had some beats be detected multiple times, so I added a randomiser, to give me a random duration. I them compare the last recorded beat with the current beat subracting the random, to decide if the game should include this beat.

The last portion general logic, was how to make sure each player sees the same beats. I ended up writing an API to generate the beats, them save these in the database.

Also in the database is the players, their sessions (games), the songs, and the leaderboard.
On first visit I store the user IP, which is then updated when you submit a name. In order to resolve conflicting IPs, I automatically show the last used name for the supplied IP, and if you were to change that, a new user is created. Also, if you have someone else on the same IP playing, I compare your IP & name as a combination to find the specific user.
For example, you play as John with the ip of Your sibling plays later as Danny with the same ip of, if you load the game again, you would see "Danny". However if you input your name as "John" again, you would jump back to your initial user.

You can see the project so far at: