2 mins
For our game we wanted audio in order to enhance the experience. Audio in a game can be used to direct where a player is meant to go, signal that something has happened and you should be aware of it, adding more immersiveness to an enviroment and many more. This is why adding in the audio for our game was important. The links below hightlight the importance of having music and sound, in a game or a film, to improve the user’s experience.
JAWS WITH AND WITH MUSIC THE SOUDN DESIGN OF HORIZON ZERO DAWN
SoLoud was the engine that was used in the game. It was fairly simple to setup with just having to include a couple of lines in the cmake file in order to import the engine when the game builds. After that it is farily simple to get sound playing in the game. The files had to be included in the header file but then its was just initilising the component to play the sounds and loading the sounds in.
## Header file syntax
SoLoud::Soloud sound_player;
Soloud::Wav music;
## CPP file syntax
sound_player.init();
music.load();
sound_player.play(music);
Since our game had a retro synthwave theme we decided to go with the same kind of music, so we decided on songs M.O.O.N - Dust and Dynatron - Pulse Power. These two songs were the backing music to our game and gave that very distinct reto vibe we had for our game. The othe reason was that these songs both progressed to become grander and this helped for when playing the game as the player would be able to feel as they are proressing as well.
Once we implemented the music, the game soudned great and was working fine apart from one thing. It took forever to load up. This was down to the music and it was slowing the game down. It went from a couple of seconds to load up, to around 10-15 seconds. We knew it was the music but we thought instanciating multiple objects that have to load up and can access every sound possible might be slowing it down more. So we decided to pass the audio engine instead to each scene but that then interfered with the game scene. We didn’t manage to get the issue sorted in the end but our lecturer pointed out that we hadn’t compressed the audio and that’s what was slowing down the load up, so next time we know to compress the audio.
Subscribe to this blog via RSS.
Low level programming dev diary 28
Text based adventure dev diary 6
Level design developer diary 3
Game engine programming dev diary 14
Audio-visual production dev diary 7
Audio-Visual Production: Particle System Mesh Spawning Issues
Posted on 20 Feb 2020Low level programming dev diary (28) Text based adventure dev diary (6) Level design developer diary (3) Post mortem (4) Ex-machina dev diary (11) Game engine programming dev diary (14) Network game dev diary (11) Audio-visual production dev diary (7)