Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Faking 3D sound? I have an idea

Author
Message
washburnrover
13
Years of Service
User Offline
Joined: 4th Oct 2011
Location:
Posted: 12th Jun 2012 19:45
currently FPSC doesn't have 3d sound (to the best of my knowledge, and I hope it's added in a future update), but what if you have 5 different versions of the external sound (see attached .jpeg diagram, each color of arrow represents a sound file). You could use a script to locate the origin of the sound and use the locate-angle type of commands (can't remember the exact ones right now), as well as their distance ---> sound-strength. Sure, when your turning it would either keep the same sound playing, or be too obvious of a jump to a different position, but there's a few ways to counteract that that i think could be done:
1) make a crap-load more variations of the sound (for a smoother "fade")
2) more coding, maybe do an actual fade between variations of the sound based on the player camera position

That Big Idea guy that can't find the time...

Attachments

Login to view attachments
Anigma
13
Years of Service
User Offline
Joined: 25th Mar 2011
Location:
Posted: 15th Jun 2012 02:22
Why not just have an entity make the sound you want? I'm pretty sure the generator entity in the SciFi pack does this, and the humming noise it makes works just fine as a 3d sound. Or am I misunderstanding what you're trying to do?

-Anigma

It compiled! Ship it!
washburnrover
13
Years of Service
User Offline
Joined: 4th Oct 2011
Location:
Posted: 15th Jun 2012 06:30
hmmmm, didn't know they added 3d sound, even if just for static objects... I am specifically talking about enemies/characters, that when they shoot guns, it's mono sound (you don't know which direction they are) as well as footsteps (i'm not sure there's any enemy footstep sounds actually).

That Big Idea guy that can't find the time...
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 15th Jun 2012 13:51 Edited at: 15th Jun 2012 13:52
not surroundsound, but stereo. when you get attacked from left, sound is coming from left, when from right, sound comes from the right. also sound=x is fading over distance defined by soundscale=x in levelsetup.ini. only plrsound=x and music(overrride)=x generates the sound "in the head of the player", so center.

the stereo-effect is not that good as sound-handling is a mess in fpsc, but basically its there.

Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 16th Jun 2012 18:16
Technically if you created two sounds, one with only the left sound channel and one with only the right sound channel, you could code the effect yourself. You could calculate the difference between the player and entity X co-ordinates and Y co-ordinates, then use the trig commands to adjust the volume of each of the sounds. It would be much easier if this feature was included in the source though.


Official LightStorm Engine BETA Tester
/?m=forum_view&t=190541&b=21
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 26th Jun 2012 01:42
This post is interesting because if you are a good sound engineer you can do many various sound files for one sound. For example I looked into Fallout3 and for an explosion they have a distant version included. So if the explosion happens to far away from the player it has a very distant sound.

Can take this step further and create sounds for top left, bottom left, top right and bottom right. And these sounds would be called based on player location to the entity generating the sound.

Login to post a reply

Server time is: 2024-11-24 00:26:45
Your offset time is: 2024-11-24 00:26:45