Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

troleoleo

3
Posts
31
Followers
2
Following
A member registered Mar 20, 2018 · View creator page →

Creator of

Recent community posts

This game is very simple yet effective and fits the theme nicely.

it takes the minimalist fun of Flappy Bird and brings the a whole new dimension! Give it a try!

Hi again, if you want to check our code, everything is in this Github depot, feel free to use any piece of code there: https://github.com/leolefebvre/GMTK-2019 (the code is a bit dirty-but-it-works because of Game Jam).

The specific piece of code that handles the sound and the queue is here : https://github.com/leolefebvre/GMTK-2019/blob/master/GTMK-2019-UnityProject/Assets/Script/Managers/SoundManager.cs

To answer your questions: the queue doesn't wait for the song compass. it just wait 0.05 seconds before launching the next sound in the queue and your brain is just playing :)

I was planning on doing something that waits for the song compass, but because it was a game jam I decided to go for the easy solution and it was enough to do the trick ^^

More detail on the implementation:

  1. When a sound arrives, the manager checks if the sound source is open (I just used a Boolean as a gate).
  2. If the sound source is open, it plays the sound right away, closes the game (Boolean set to false), and launch a coroutine that will handle the next sound source opening (more on that later). If the sound source is closed, the sound is added to the queue.
  3. The coroutine waits for a fixed time (here it's 0.05 seconds), then there is a piece of code that check if there is something in the queue. If there is, it plays the first sound in the queue, then remove it and launch the coroutine again. If the queue is empty it opens the gate.

Finally after testing we added some details:

  • There is a maximum count in the queue (if a sound arrives and the queue is full, it is ignored). before you could stack a lot of sounds in the queue if you just kept selecting and de-selecting super fast. Problems were that sounds could go on for a long time (that was weird but still funny), and I was afraid that someone could overload the memory with it since the queue was getting bigger and bigger
  • The keys to play were stored in a list. The manager chooses the key to play based on the number of pieces selected (at the time a piece is selected). When the number of key is higher than the number of key in the list, I added a piece of code to repeat the last two keys.

A trivia about the last one: The first version was just repeating everything from the start (it was just a modulo that you can still see commented ^^). It did not sound good so I added the code explain before.

This code actually allows to repeat the next x key (but only ascending, I didn't took the time to write an equation so that it makes "waves", as in up and down). So we played with it a little bit (what if we play the last 3 keys? only the last 1 key?) and then settled on the last 2 keys.

It was quite fascinating to try those different effects and see what would work best, and it can take quite a while to make it make it right (we had to choose fast because Game Jam).

I hope I answered all your questions, and I am sure you can find resources online to help you find what you need!

Hi, I'm one of the creator the game. 

There is indeed an algorithm for the sounds when you select pieces, it's awesome that you noticed it 😄

Our goal was to give a satisfying feeling when players select several pieces. I got inspired by the Zelda games where there is scale when you chain attacks on enemies. It is well explained in this video : 

So first our awesome sound designer exported keys based on the main music's scale. I made a small code piece to play those keys one after the other when shapes are selected.

Then there was a second step: we realized that it sounded bad when several shapes where selected at the same time or very fast. To fix it I added a code that puts sounds in a queue, then the queue release queue every fraction of seconds to make it sound more harmonious. 

I hope I answered all your questions, feel free to ask if you want more details 🙂