February #1GAM Game - My Mind Is Going

It is done! Well ok, it is very far from done. It’s as far from done as far from done yet functional can be. It’s messy, buggy, untested, and the score calculations are all weird. But it works and it makes you want to throw things through windows when you play it.

My February One Game a Month submission is a rhythm game. Not a game that actually _requires _any rhythm, but a game that attempts to follow along with the rhythm of the music. It’s called My Mind Is Going, named after a track by the artist who kindly let me use his music for the game - Clearside.

Play the game here. 

View the code here. 

There is a very annoying bug where sometimes the loading bar gets stuck and needs a refresh…also I have only tested this thing in Chrome, so have no idea if this even loads in other browsers.

The idea

The idea hasn’t changed much since conception (at the end of January) except for the removal of mouse control. Originally you had to move the mouse as close as possible to the center of each circle to spawn your circle of the appropriate color in that spot. The scoring then took both the closeness of your position to the guide and your timing into account. However, this game is already overwhelming enough without having to also use your mouse, so I took this out and now all you have to do is hold and release the appropriate number key (1-4) or space key at the correct time to match the size of the guide as closely as possible.

The implementation

My main concern was (and still is) getting uniform timing across browsers. I think I got it right but I’ve only been able to test on a couple of different machines.

The gist of how I ended up triggering events is:

Create an array of triggers. One trigger element looks like this:

{mark: 54.76, duration: 0.68, kind: 'red'}

Set a buffer time - how many seconds of warning the player will have before a guide has to be triggered. I start off with this set to 2, but soon this gets decreased to 1 after a short “breaking in” period. Then, a guide entity is spawned as follows:

             // If there are triggers remaining...
            if (this.triggerMarks.length > 0) {
                // Use the first trigger in the array to spawn guide two seconds before mark
                if ( ig.music.currentTrack.currentTime >= this.triggerMarks[0].mark - this.guideBuffer) {
                    var currentMark = this.triggerMarks[0];
                    // Pick random position on the screen for the guide
                    var posX = this.controller.randomFromTo(50, ig.system.width - 50);
                    var posY = this.controller.randomFromTo(50, ig.system.height - 50);
                    // Spawn guide
                    this.spawnEntity(EntityGuide, posX, posY, {duration: currentMark.duration, kind: currentMark.kind, targetTime: currentMark.mark} );
                    // Remove first trigger from array

I considered making the color of the guide random as well as the position, but realized that without some additional workarounds this would be risky - what if the guide color associated with the same key had to be triggered at the same time? So I set the colors manually and the positions randomly (a workaround would be checking if a guide of a randomly selected color is already on the screen, for example)

While the buffer second is going, a gray silhouette appears behind the guide. It contracts inwards and when it hits the guide, the player knows to start holding down the appropriate key. There is also a stroke outline with a very rough position shown to let the player know about when the guide will start to contract (signalling to release the key). I never got this outline correct exactly (it requires predicting not just the radius of the guide when it reaches the lifespan/duration I’ve set for it but also the current lag).

Points are calculated out of 100, with some slight adjustments depending on whether the guide is expanding or contracting (contraction is faster and more forgiving). This still needs a lot of work.

I also added a progress bar showing the player exactly when this torture is going to end (I say torture because this game is fricking hard. I don’t know, maybe it’s just me. I couldn’t get over something like 6200 points). The difficulty is not adjusted to the player’s current performance (didn’t have time) and there are a few sequences in there that I can’t even pass. If I had more time I’d do a lot more work on the actual trigger timing, duration, etc, but that’s time I don’t have. And I don’t really care, because I’m sick of tweaking fricking triggers.

[gallery ids=“49240,49241,49239”]


I have an idea for my March game, but am not feeling confident in my abilities to finish. I’ll be at GDC over the entire final week and will get little to no work done there, so will need to rush through this thing as fast as I can. It might just be some crappy clone game or something, although I really have another idea I want to try.

Speaking of GDC, I’ve built my schedule (or most of it). The sessions I decided to go to ended up being split almost 50/50 between programming and design. I am going to learn so much, it will be awesome. And hopefully I’ll get to see quite a few old friends from Australia, too, as I know a few are making it out.

© - 2021 · Liza Shulyayeva ·