Lately I’ve been trying to plan out the audio system for mu current game project. I realized that I wanted to have one global system to manage all the sounds (footsteps, damage hits, water splashes, loops). However; I’m not sure how to handle this. Using logic bricks for sound is out of the question because that’ll end up being more confusing than building a global system.
I’ve been thinking of making an audio class that multiple components to it. Functions that handle playing the sound, organizing the sound, receiving the sounds, checking the played sound, etc.
Let me give a couple of examples…
I want there to be footstep sounds when the player’s feet touches the ground. When the player’s foot hits the ground, I add the footstep sound into the global queue as a one time play, the audio system plays the sound, and then removes the sound from the global queue.
Maybe the player is severely hurt and a beeping alert sound starts to loop. The sound is added into the queue as a loop type, the audio system plays the sound (infinitely). Later the system gets a signal to stop the sound, the sound stops, and the it gets removed from the queue.
I’m not sure if this is the best way to do it, and I’m not sure how I’d go about actually doing it. I’m thinking of using BGEs sound system (audi?).
How would you guys go about making a sound system?