About 3D Sound

From the very low interest responses I’m getting in my survey for 3D sound, I thought it might be a good idea to explain in more detail exactly what this part of the plugin entails. I have a feeling that the power and nature of this are misunderstood.

First, with FPSC-R in its current state there is no true positional 3D sound capability. I’ve experimented with attaching sounds to objects and there is “some” fall-off of sound at distance, but no way to set it so it has a proper fall-off. For example, I attached thunder sounds to an object in my game and the sounds are nice and loud right by the object and softer when at distance. But it seems to be about one way or the other. It’s either loud right at the source or a certain level of softness at any range beyond say 500 (just a guess here). It doesn’t falloff steadily as you move away from the source and doesn’t appear to ever stop at long range. With this implementation you can never get the effect of something flying by or getting steadily louder as you approach it. No campfire sounds smoothly increasing in volume or helicopters whizzing over head. No doppler shift in sounds as the rocket flies by or the train goes past either.

Second, with FPSC-R in its current state you are limited to “how” you can play sounds and how many sounds you can play. You can attach 2 sounds to an entity and tell the engine to play each one in your script. So, if you have a custom monster then you can basically play his hurt sound and his death moan. Forget about his battle rage roar or an attack sound or anything else. With clever coding and the use of certain tricks you can do more than this, but it sure would be nice to have an easier way of doing it rather than resorting to trick code.

Third, the new music system in place since 1.008 allows you to pre-load 4 music tracks, with one of them possibly being the combat music track. Not bad, but I can use many more tracks than this easily in a single level for various areas and moods. 

Imagine being able to specify a list of music tracks and sound effects that load up when your game starts and you can play from anywhere in your scripts without limitation? You want 10 music tracks and the ability to fade them in/out? You want a custom character that can have 3D sounds attached for walking, running, attacking, random selection of voice-over commands, etc? Want reverb sound zones? That’s the kind of stuff this 3D sound system will provide. Here’s an example of how easy it will be to play a sound anywhere in your script.

— Pre-load sounds in an init function of your choice
soundExplosion = ocLoadSound(“explosion.wav”);

— Play sound anywhere in another script
ocPlaySound(soundExplosion);

For 3D sound you would only need to update the listener position and the objects’s position when it moves. Very simple.

I hope this gives everyone a better understanding of what this system is designed to provide. I currently have a single sound 3D prototype working in Omega Core. I just need to work out a bug where it’s having trouble with multiple buffers. Once I solve that, this system will be very close to being ready for testing.

Tommy

Advertisements

I am a born again Christian and a servant of our Lord Jesus Christ. I'm happily married to my wife, Michelle, and I have 2 beautiful daughters named Sarah and Grace. I am a programmer, filmmaker, and video game maker.

Posted in News
4 comments on “About 3D Sound
  1. magiqueprod says:

    Another important ting to consider is that if you use the Omega Core sound system for music and most of your sound effects then you’ve offloaded memory usage from FPSC-R. And at this time, there are memory limitations (re: artificial?) that can cause your demo to crash. I had to reduce all my music and sounds down to 16000 sampling rate just to get my final entry to run without crashing. Thankfully, there was no noticeable degradation in the quality.

  2. thecatpetter says:

    I would love to have 3D sound in FPSCR!

  3. magiqueprod says:

    Well, if I can just figure out this one little bug then it’ll be added to Omega Core very soon. The final details are fairly straightforward to implement. I was also seeing a situation where the 3D sound didn’t always play when I ran the test so there may be another issue to resolve as well.

  4. magiqueprod says:

    This has become a moot point now. I solved my bugs and will have this sound system working and ready to go in a day. So, I can check that feature off the list and move on to multi-player and GUI.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: