Today I’ve posted 3 songs from my upcoming game on Soundcloud. I wanted to create a soundtrack that sounded like instrumental surf music with electronic instruments… I like how these songs have turned out and I’ll probably make a couple more in the next few days… do comment if you like them (or even if you don’t…). I’ll probably will make them available for download in some form after I release the game.
I’ve been working on the sound for the game for the last couple of days, both creating the music and sound fx and programming it into the actual code. It was fun working with music again (it’s been a while), it’s certainly a welcomed change after so many hours thinking and coding…
The rest is for those interesting in programming… I ended up using the Cocos2d sound library, which is simple to use, but found out you can’t loop sound effects with it’s simple audio class, so I ended up digging deeper and created a new class for looped sound effects that uses the CDSoundSource objects as a base but can also fade the audio in or out (when the sound starts or stops) while also allowing for looping. This was tricky but the end result is nice.
I did it especially for the engine sound of the ships, because with regular looping the sound gets cut off too suddenly when you release the thrust button. I needed to integrate the sound looping into my game loop (The Cocos2d sound library supports Cocos2d actions for this sort of thing, but I’m not using the whole engine). The end result is really cool because not only the engine sound fades in and out, but it also smoothly changes volume as the thrust is increased or decreased.
And last… based on this class, I created the game’s DJ class… a class that has all the different songs and smoothly switches between them when necessary, cross-fading the songs with a very nice transition…
It’s funny because this is the first time I’ve gone into such detail when making a game… I really think this game is shaping up to be the best of what I’ve done in my life! 😀