Friday, May 12, 2017

Day 44: Audio-only Game: Day 19

An "audio-only" game would be kind of pointless without sound effects. Most of what I will use I can find on SFX websites (licensing shouldn't be a problem since I'm not getting money from the game). However, I'll need a program to edit the sound files to fit my needs. For that, I decided to use Audacity: A free sound editor.

Now that that's done, I can look for sound effects. I found two "medieval" sound effects packs which includes sounds for swords, bows, and dozens others. Unfortunately, most of the blade-on-blade sounds are just light tapping. There's no real clash. So I probably won't be using many of those sounds.

Luckily, the unity asset store has some free sounds. I found a "woosh" sound that I will probably use for the sword swing.

To be able to play a sound effect using script, I needed to first add these two lines as variables. As seen here, I'm using an "unsheath" sound. Afterwards, I changed UnsheathSound to PlayerSound, since that audio source will be used for more than one sound.


I then inserted a line of code into the script that controls the sword selection, so if the sword is not equipped and "1" is pressed, the sound will play.


Next class I will add more sounds such as the sword swing, sheathing the sword, and the crossbow sounds.
















No comments:

Post a Comment