Hello Everyone. Welcome to the 4th week! It’s been one month since I started the development. Time flies…
It was the “Audio and Publishing Sprint” — the sprint when I work on audio for the game and release a build for testing.
TLDR:
- Found a new tool to work with while adding sound effects for the game
- Added sound effects for the player, environment, and some intractable objects. I love the Audio Mixer in Unity.
- Added music for the levels.
- Created a level manager system to load different levels.
- I Played around with baked lighting — got a disastrous result.
- I made the build and tested it. The result will SHOCK YOU! — no, not really…
- A slight modification in the plan when working with audio.
So, let’s begin!
Found a new tool!
Working with sound effects requires you to have a massive library of sound files. I had a sound effects pack which I bought from the Asset Store a long time ago. It had a good sound effects collection, but it wasn’t easy to find the right one. And when you do find it, you might want only a portion of it. That meant I had to open it in another audio application, trim it and then add it to the Unity project. I am totally fine with the work involved here, but it becomes a hindrance when you quickly test them in the project and iterate through many sounds. Fortunately, I found an excellent tool — thanks to Jason Wiemann for hosting this weekly podcast about game design on YouTube.
It’s a tool called “Soundly” — link if you want to check it out. By the way, this is not a sponsored segment. I genuinely found it very useful. For one thing, it has its own collection of sound effects. You can also manage your personal library of sound effects and music. It’s easy for discoverability, finding the suitable file, marking them, and has a couple of other features around it. But the best one I liked was that you could have the segment of the music you want by just selecting the portion in the timeline and dragging and dropping it into Unity.
It sped things up. It’s a paid software but has a free tier to it. I am using the free part of it now but have plans to subscribe to it in the future.
Adding Sound effects
I made a list of sound effects I wanted to add to the game at this stage and started hunting for it. Once I had that, I started adding them to the characters and props in Unity.
The principle I decided to follow is that each object that is supposed to produce the sound effects should manage its sounds independently without any dependencies. So I attached each interactive object with an Audio Source component and added a script to hold all the sound effects it will need. The script which manages its interactions also calls the Sound effect script to play the right track at the right time.
For the main player — the egg, I had a different approach. I wanted the egg to make sounds when it landed on the surface and when it rolled around. But the sound it makes should be different depending on the kind of surface it rolls on. I could have added all the sound effects for all the surfaces on the player itself, but I decided against it. I feared it would become tedious to manage if I ended up with 10–12 different surfaces. So I allocated that responsibility to the surfaces themselves. Now, when I attach a scriptable object to a surface, it holds its drag values and the sound the player makes while rolling on it. The player picks up the sound files from the surface and manages when to play them.
Next was the environment sound. The test level was a beach. So I added two music files, one was of the ocean hitting the shore, and the other was the birds chirping. Then I thought, won’t it be cool if the ocean sound was more when I am near it, and the birds sound becomes louder when I move up away from the shore. I have heard about Unity’s Audio mixer, but I never used it before. I thought of giving it a shot before thinking of something complicated on my own. And to my surprise, it was so easier to implement than I had imagined. When the player moves up the cliff, the beach sound fades, and birds chirp becomes louder.
Adding Music
Adding music was relatively easy. I didn’t complicate anything at this stage. I just asked a script to play the chosen track when the concerned scenes are loaded. The implemented soundtracks were available with the Sound Effects pack I had bought.
Level Manager
Now I have added the level manager to load in and out different levels during runtime. I also created a UI system to manage it. They are very basic and will be useful only to test different levels and debug in the build.
I also need to improve the Level Manager script. Right now, I have to specify the scene index accurately to load the right level. I am hoping for a workaround where I can simply drag and drop the right scenes in a script, and it takes care of loading them during the runtime accurately. I got some helpful suggestions from the Discord community regarding this. I’ll try it in the next iteration.
Lighting
I found a video talking about how lighting works in Unity and how mixed lighting is used for baking light and getting real-time lighting. So I gave it a shot.
The video did tell me that baking the lights takes time, but I wasn’t prepared for the two hours Unity took. And when finished, it was crappy.
But not completely bad. Fortunately, I know the issues which caused it. So I’ll take care of them in the actual levels I’ll design soon.
Build and Test
Finally, I made a build-out of Unity and played the game. I wore my critic lense and tested it. And the result was:
It was ‘fine.’
I didn’t encounter any computer crashing bugs as of now, but I found plenty of things to change or improve. There were some issues with the frame rate and others related to graphics. I have noted them down, and I’ll work on it next time.
The plan was to send the build for limited closed testing but decided against it because it doesn’t have the combat mechanic yet — which is like one of the main parts of the game. For this, I am targeting the 3rd release — Version 0.3, where I’ll include the exploration and combat part together.
Apart from that, the build was OK. I was mostly satisfied except when it came to Audio!
Audio Nightmare
It was a mess. The music was too loud, and I couldn’t hear the sound effects. And when I did hear the sound effects, they were terrible, jarring, and felt out of place. And it’s not like this is happening to me for the first time. It has happened with all the previous games I made, and I spent days perfecting them. I don’t know why I thought this time would be different.
One mistake I made was to test the audio in the Unity Editor with the headphones on. It sounded dramatically different through the laptop speakers.
The other one was, of course, not having the right music and sound effects file to fit the game. But I don’t want to spend hours perfecting the sound effects and composing the perfect music for the game when it is this early in the development process. Nothing about the story, the core game loop, visual styling, and the overall mood is finalized. So I have decided to wait a while before I start working on this properly. For now, I will use temporary sound effects and music to work on the coding logic. Later with attention and dedicated time, I’ll find or create the proper sound effects and get some experts to compose an excellent track for the game.
Up next: Game Design Sprint / Coding sprint
I am still working on what I should call this sprint. I’ll figure it out eventually.
Anyways, I’ll be busy working on the combat part of the game for the next two weeks. I am excited about it.
So that’s the update. See you in the next one!
I wish you very well!
Originally published at https://www.theearlyowl.com on September 11, 2021.