The big thing that has been missing from King Randall’s Party so far has been sound. The videos I’ve published so far have had game music playing, but it’s always been applied after the video capture. Plus, just having music wasn’t enough; I needed some great sound effects to really make the game world seem cohesive and the action real. So this week I implemented a SoundManager into my game using IrrKlang. IrrKlang has a good set of simple 2D and 3D sound libraries available for a reasonable price, and after a bit of testing I decided to go with them.
For those of you with some coding experience, I setup an IManagesSound interface, and made a class called IrrKlangSoundManager which implements that interface. Since IrrKlang isn’t setup to work on a lot of platforms, this will let me easily swap out the IrrKlangSoundManager with another one which uses libraries that work on other platforms when I eventually want to port to another platform.
So one aspect of any sound implementation that is really important to me is variety. If you just have one sound effect for arrows being shot…. well, that’s going to get old on the players ears REALLY quickly. And mine – since I will spend more time playing this game than anyone else. So in my sound manager I’ve setup categories of sound such as “FiringArrows” which can contain multiple sounds. When a building or character in the game fires an arrow and needs the appropriate effect played, it tells the manager to play a FiringArrows effect, and the manager will play a random sound effect from that category. All of the effects in a category will be pretty similar, they may even be the same sound effect with a simple pitch change, but those differences will add enough variety where it won’t bother the player.
Here is a short video with some basic sound effects. I picked these up off of AudioJungle.com for super cheap, and I recommend it as a great place to get audio clips for your game. Some of the clips will be pretty raw, so you have to have a good ear to pick out ones that are good enough to go straight into your game unless you’re comfortable doing sound editing yourself. And note: unless you are a sound engineer by trade, just stay away from it; it’s tough work that respects the attention of a pro.