• entries
    743
  • comments
    1924
  • views
    580417

Sounds

Sign in to follow this  

251 views

No pictures again - still working on the sound system.

I've got the basics in place for my item-to-item collision sound system now. The basic idea is that everything has a "material" property, currently earth, wood and metal and there are a bunch of effects for the various combinations of collisions.

I then construct a 2D table that indexes the correct sound effect based on the two materials.

When debris receives a collision event, it submits it to the ImpactManager, which only stores it if there is not an existing event already stored that frame for the two IDs of the objects and as long as neither material is mtNone.

Then, at the end of the frame, the ImpactManager runs through the list and plays the sounds, modifying the volume based on the velocity of the impact.

The existing sound system then modulates the volume and pan of the sounds relative to Squishy's position.

The effects themselves are stored in AudioEffectRings, which basically duplicate the sound a certain number of times, then play them in a ring fashion, so that several instances of the same sound can be played at the same time. This is better than each object holding its own duplicated buffers, since that could get wildly out of control as we add more materials and lots of objects.

The system works really well, although the sound effects are a bit crap at the moment. You need to picture this - me sitting in my corner with a microphone, tapping a wooden spoon against a cheese grater while my girlfriend gives me strange and slightly concerned glances. Then again, she's the one watching the Katie Price/Piers Morgan interview, which to my mind is far, far more disturbing. [smile]
Sign in to follow this  


6 Comments


Recommended Comments

Quote:
Original post by rip-off
Can't wait to sample the results [grin]. Ok I'll stop now.


*groan*

Share this comment


Link to comment
Quote:
You need to picture this - me sitting in my corner with a microphone, tapping a wooden spoon against a cheese grater ...


Try not to worry about it -- this happens to me all of the time. And usually there isn't even a microphone involved. [grin]

Share this comment


Link to comment
Quote:
Original post by HopeDagger
Quote:
You need to picture this - me sitting in my corner with a microphone, tapping a wooden spoon against a cheese grater ...


Try not to worry about it -- this happens to me all of the time. And usually there isn't even a microphone involved. [grin]


[smile]

Share this comment


Link to comment
Wow, I haven't checked in here in quite a while. I'm impressed! It looks really fun, and I can't wait to see more :D

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now