Log 06

I think I’ll only get one scene done by the end of August. In part, because I definitely did not expect sounds to be as tricky as they are. In the spirit of this project being a learning project, I decided to also learn how to use FMOD, which is audio middleware, and implement the sounds that way. Admittedly, at the beginning of this section I wasn’t sure why anyone would use audio middleware when Unity had a perfectly good audio system, but I think I get it better now: What FMOD gives you is a lot of audio filters, effects, and other scripted features without you needing to program them manually. For example, the gunshot effect…it’s simple enough, in Unity, to play the sound. But with FMOD, I was able to add a pitch modulation to it, so that it randomly pitches up and down a little, giving each gunshot sound a little variation without needing extra sound effects. FMOD also lets you create a sound effect with multiple sound files, and randomly choose one. Or play dynamic music, where different instruments are added in based on various variables, etc…

I don’t have music yet, so I’m just using the sound parts of FMOD. I think I’ve gotten a good grasp of the program now, but I did spend the whole two weeks on that, so there wasn’t much other progress. There’s still work to be done there, too, namely that FMOD doesn’t integrate amazingly with Unity’s timeline. Sounds don’t pause when the timeline pauses, and after the timeline resumes, instead of sounds playing from where they left off (like I’d expect for a movie scrubbing), they play again from the beginning. So…back to editing Unity’s timeline to accomodate this, I guess. Or I can just give up, since this will only be a problem if you pause the play in the middle.

The other thing I accomplished in the last week was to get builds running. I can make Windows builds that work, and mac builds that kind of don’t work unless you do some terminal work. This was a surprisingly difficult process, because there were a few snags along the way: the first was that by default, it was building with the lowest visual quality setting which didn’t support additional lights (kind of important for this play). The second was that if you mark an object EditorOnly, it and all of its children no longer show up in builds. A lot of things broke because of that! But I can produce builds now, so at any time when I feel like I’m done with this play I could produce a build and let people play it. On Windows.