Adding the finishing details to the game
The game is now functionally complete, but it doesn't have any polish or the finishing details we would expect of a full game. There is no music, no background art, and no explosions! Let's fix that right now.
Adding the game music
We want the music to start at the beginning and play for the duration of the game. When the win/lose condition occurs, we want the music to fade out to let the player know that the game is over.
Create a new Sound and name it
snd_Music
.Load
Chapter 3/Sounds/Music.mp3
. Kind should be set to Background Music.Reopen
scr_Overlord_Create
. Since the Overlord controls the overall game, we will use it to control the music as well. After the last line of code, add the following:sound_play(snd_Music); sound_loop(snd_Music); volume = 1; sound_global_volume(volume);
We start by playing the music and set it to loop. We then create a variable,
volume
, that we will use for controlling the sound level and the fade out. We have set the sound...