Slow Rush Studios logo,
    depicting an apprehensive-looking snail rushing forward

Slow Rush Studios

◂  Timing Animations
News index

Effecting Sound

Contents

Toot toot! We're still on the polishing train, so this week I added support for some sound effects and music.

Turns out sound is a battle and a half, but at least we've finally got some boom barrels going BOOM now.

Sounds

In my head, getting sounds working was going to go something like this:

  1. "Hey, I need a sound for a barrel exploding."
  2. Go to freesound.org1 and search for "explosion" to download a nice boom sound file.
  3. Open up text editor and type in "when barrel explodes, play the sound from that barrel explosion file".
  4. Run game and verify that barrels now go boom.

Ha. Ha. Haaaa.

How naive.

Finding sounds

When I actually started browsing Freesound for my barrel explosion, I realised something:

Diagram showing why the typical Freesound uploader struggles to make good boom sounds
Who would have thought that professionals want to be paid for their work?

Now, there are real pros recording big booms out there, but they understandably need to recoup the cost of all the damage they're causing, so their stuff doesn't end up on Freesound.

And I can't really justify paying big dollars for a small game prototype, so finding the right sounds was going to take more work.

Ultimately I drew from different sound sources:

Searching through gigabytes of downloaded sounds is painful, but I found Sononym helped a little.

Making sounds

Sometimes I couldn't find a decent sound, so - inspired by Jonas Tyroller - I had a go at making my own.

Here is a bow firing:

Bow firing is composed of a door creaking noise followed by a string twanging noise, mashed together in Reaper. (click to play)

I rate myself a 1.5 out of 10 in anything-audio, so feedback and tips are appreciated!

Playing sounds

At least playing sounds should be easy, right? Well...

It turns out there are whole companies3 who just make software for better audio playback in games. Wow.

But I didn't have time to integrate any of that, so I just hacked something together:

That's it! 5

Playable Audible web build‎

Try out the game with some sound effects here, and let me know Discord in Discord or via email which sound effects are the worst.

Press F1 for help, including to see keyboard/mouse controls. Mobile devices probably won't work! By playing you agree to our Privacy Policy.

I'm not done! Here are some sound effects I haven't added yet:

.. and also a lot of the sound effects I have added still need some tuning or replacement. But you gotta start somewhere.

Known issue: sometimes you hear the bow firing effect but the bow isn't actually fired because the enemy changes their mind and does something else instead before finishing firing. Probably I should make it so that once an enemy starts attacking, they have to actually execute their attack in full?


1

Also set the licensing filter to "Creative Commons 0" so I don't have to credit a hundred different people for making one sound each.

2

And just to be clear, when I say Web Browsers, I mean "Safari". It took them 10 years to add support for Ogg Vorbis, and that only shipped 2 weeks ago so I still can't use it.

3

Fmod is probably the most popular one for indie developers like me; Wwise is another one.

4

Even this was a small can of worms: where is the "listener" when you have 2 player characters running around in local co-op?

Initially I thought it should be the center of the screen, since both players would be roughly near that - after all, the camera follows the players around. But that falls apart when the player is at the edge of a level, which causes the camera to snap to the edge of the level - then the player(s) are no longer centered in it, and their sounds get quieter.

Then I figured we should use the average position of players, but that doesn't work so well if two players are together and a third is further away.

Eventually I settled on "each player is a listener", so an effect's volume is determined by the player closest to where the effect was played from. (Seems like fmod takes that approach too.)

5

Well, I also had to fix a sound library bug that was stopping any sound from playing at all on the web build.

And add in some very basic plumbing to support rollback.

And decide how to manage sound assets.

And work around the sound library's inability to stop only a single instance of sound from playing.

And do some dirty hacks to make attack sounds play at the right time in attack animations.

◂  Timing Animations
News index