New Foley For A New Year

Troy Corbin Developer Updates Leave a Comment

Hey all! After taking a month off for the holidays, I’ve jumped back in the saddle to get this thing rocking again. I decided to start off with something that has been plaguing me for months… the sound system.

Internally named Foley, my audio class frankly wasn’t working well. It simply wasn’t reliable. Sometimes a sound would play, sometimes it wouldn’t. And after adding the menu system, in game music was gone completely.

So I think I finally have these issues licked. ( I know, I’ve though this before. ) I think my biggest problem was that I tried to use the originating Entity’s ID as the sound’s ID to track ownership, movement, pause and start, etc. But what happens when an Entity makes more than one sound, like a ship that both has engine thrust and is bumping into a wall? They can’t both use the same ID.

Well, after months of trying to shoehorn this scheme into reality, I gave it up and instead assign an ID to each sound as it is played. It’s up to the Entity to then keep track of this ID ( or not ). This solves a lot of my audio problems.

The music was just stupidity on my part. I have code that pauses in game music when a menu is brought up so that the menu music can play. Then when the menus are gone it is unpaused. Well, that’s how it was supposed to work. Instead it was unpausing the music every frame, which essentially means it was restarting constantly. No wonder I couldn’t hear any music… it never got a chance to play the first note.

Hopefully we can start updating this blog more frequently in the coming months. My other major gaming obligation ( Amish Paradise ) is being passed on to others, and my responsibilities to it should be growing smaller and smaller, giving us more time for Angular Velocity.

Troy CorbinNew Foley For A New Year

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.