The first big task of v0.3 was to rebuild the audio system. Well, to build an audio system, more accurately. As I was wrapping up v0.2, I decided to throw some sound effects in as an afterthought. I only intended to add a few ambient sounds so that the game wouldn't be completely silent, but they improved the experience of the game so much that I just kept adding more and more sounds with no plan for how to manage them. I mean, there was a plan, which was for future me to deal with it, which he did. So sounds were all scattered around in the code with no rhyme or reason, which would have ended up causing a ton of problems. Like, if I wanted to add some super advanced feature like the ability to adjust the game's volume, it would mean changing dozens of lines of code, and it would only get worse as I added more sound effects. So it needed to be done. And it is. BEHOLD:
![]() |
There are now TWO OPTIONS! |
The new system makes it much easier to add, remove, and alter sounds from here on out. I also added support for placing sounds in 3-D space. Unity does this out of the box, but the built-in system lacks a few features that I needed (such as smoothly adjusting the pitch of a sound on the fly) so I ended up rolling my own. It's not very noticeable in the game as it exists but I think it will add a lot to the sense of immersion once I start implementing ship systems.
I did all of this over a year ago, back in February, when I only used the word 'pandemic' while playing the board game and Corona was just a skunky spring break beer. In the next exciting episode, I'll build an input system while the world crumbles. Stay tuned!