Thursday, May 7, 2015

Week 8 - Syncing a Countdown Sound With Game

With everything loading at the beginning of the level, it can be a bit tricky to make sure the sound plays at exactly the right moment.

Eventually I got into our StartTimer script that controls all the logic for displaying the countdown text. At first, I started the sound in the Start method of the script, which worked really well most of the time. However some later code changes seemed to make this less precise and the sound would play well before the text started it's countdown.

To get around this I made a state variable to keep track of what the sound was doing, and added logic to FixedUpdate to count for that state:


        
public class StartTimer : MonoBehaviour, Startable, Pausable
{
  ....
  bool hasStarted = false;
  ....
  
  void FixedUpdate()
  {
    ....
    if(!hasStarted)
    {
      hasStarted=true;
      soundController.PlayLevelStartCountdown();
    }
    ....
}


I was also able to use some of that logic to make sure the sound played correctly during pausing to ensure everything felt normal.

The beat ended up matching with the countdown really well!

Monday, May 4, 2015

Week 7 - Starting A Level Effect

In this week I worked on a level start sound effect.

In the beginning of our levels we had a visual count down, but no sound associated with it. Since this is the moment when you're gearing up to play the level, I wanted to make a sound effect that builds anticipation.

First things first, to make it sound like it fits, I added some echoey clapping sounds that correspond to the numbers changing. It ended up sounding pretty good and could have been enough to fill the empty space, but I wanted to keep trying to make it better.

I added some resonance sounds and chopped up some sounds and added some fun phaser effects. Here is what I had at the end of my first attempt:



While this was fine, it felt a bit over the top and just didn't feel like it fit very good. So I replaced the claps with a bass drum and took out the other sounds completely. After that I took a noise swoosh preset from the loom plugin by AIR Music Technology and tweaked it a bit so it flowed through the countdown. After that I used hybrid to create a rough electronic sound that flowed up or down in pitch. I recorded a version of both, but ended up using the one that flowed down. Here it is: