2023: Day 1 Game Immersion — Sound

Joseph Youngquist
3 min readJan 1, 2023

--

Beyond gameplay and graphics the single most important immersion tool to a Game Developer is the use of sound.

Soundwave — source: https://michaelbaystransformers.fandom.com/wiki/Soundwave

Growing up and being a complete Autobot™️, my guilty pleasure was loving Soundwave™️ a tried and true Decepticon™️. As a kid I’d run home and flip on the TV and tune in at 3:30pm to catch my favorite show, Transformers™️ and the first time I heard Soundwave’s voice I knew I was in trouble to be a true blue Autobot™️. Soundwave™️ had the most unique character voice in the series and I’d venture to say the most iconic in all of TV. Just hearing his voice, instantly transports me back to my early teens — sound has that strong of an impact and as a Game Developer it’s one of the best tools you have to draw your players into the game, becoming a part of it rather than just a player.

Today I’m going to show you how to add background music to your game, lets get to it…

As is with most things in Unity, you’ll make a new Create Empty GameObject. We’ll name it: Audio_Manager so we can add new sound objects within its hierarchy.

Within the Audio_Manager GameObject we just made, right-click (on windows) it and Create Empty again and this time name the new GameObject: Background Before we can use this new GameObject for sound, we first have to ‘Add Component’

If you do not see “Audio Source” or any “Audio” components then you can use the Search feature, as you can see I used ‘aud’ to narrow down the options until I could find the “Audio Source” component.

Before your AudioSource can play anything, you’ll need to click and drag an audio file to the “AudioClip”:

Here, I’ve applied my “music_background” audio source file to the AudioClip. I’ve also checked the “Loop” property and I’ve moved the “Volume” to 0.4 mostly to suite my own tastes and until we add a “settings” feature to our game, we want to bring the “mood”, so to speak, down a notch or 6 — also, my audio source was just very loud ;)

Now if you fire up your game, you’ll have some sound playing! If you want to check out my game, here’s a link to the Web build version: https://joseph-youngquist.github.io/space-shooter-pro/

In my next article, I’ll show you how to add the Sound FX for shooting, explosions and power-ups!

--

--

Joseph Youngquist
Joseph Youngquist

Written by Joseph Youngquist

Veteran to Digital Media publishing, Software Engineering and Architecture starting on a pivot to Unity Development

No responses yet