The first impulse is to use some clips from a sound bank like freesound.
That is correct when the sound don’t need be in sync with an animation, like player hit, spam bullets, simple explosion. I used several clips for sounds like those.
The problem comes with a little complex animations. It is difficult, if not impossible, to find a single clip that match the timing. In this cases, the best option is layer several sounds to get a more complex and rich effect.
If you try to make this sync by code, this will result in a mess. A lot of effort to array all sounds together and play at the right time. The solution is make your own sound.
BOOM! Drop mic!
Easy! It not that complex. I made some sounds for my game, so you can do it too.
First Step: Select your tools
The first step is to select the right tool for the work, in this case a video editor. Why? Because a video editor allow you to add video and several audios and move along the timeline, cut the videos, cut the audios and mix audios all together.
I used kdenlive. It is simple enough, free and open source, so it fit with my tastes, I know that other game developers use Adobe Premiere, because they previously own, so They don’t need another video editor. There is a lot of free alternatives out there, but the software need to be a non linera editor.
Second Step: Know your sounds needs
I made an excel (google speadsheets) and fill in all the needed sounds: UI clicks, pops, cancel, error, etc… The weapons spawn, move, explosions, etc… The objective is to have a clear vision of your sound needs.
Third Step: Collect your animations
I capture some footage of my game with the animations I need to sync and added to a new project in the video editor, remove any audio track and cut all frames that not are part of the task.
Fourth Step: Finding the sounds
The more time consuming task is to surf the sounds banks to find sounds that you like for the animation. When you have all the sounds, you add it to the project and star cutting, moving, fading and mixing until you have a good SFX for that animation.
Last Step: Getting the output
The last step is to export only the audio.
WARNING: Some software than add fade out to the start and the end of the clip.
The end result is a perfect time sound for your animation.