Page 1 of 1

Location based sounds

Posted: 05 Oct 2007, 20:09
by Cosmostrator
With the new dynamic particle effects I was thinking that it would be neat to have sounds for specific locations. For instance a sound of a waterfall that you would hear louder as you get closer to the waterfall. This could be very neat for the waterfall, torches in the caves, river, and maybe other areas as well.
Is it technically possible?
Even if we can't do this for the current server if it could be programmed into the new one I'll start working on some possible sounds.
-Cosmostrator

Posted: 06 Oct 2007, 00:42
by Crush
That would be a completely client-sided feature and thus wouldn't need the new server. It sounds like a quite good idea. But I am not sure how difficult it would be to adjust the volume with the distance.

Re: Location based sounds

Posted: 06 Oct 2007, 11:52
by Modanung
Cosmostrator wrote:With the new dynamic particle effects I was thinking that it would be neat to have sounds for specific locations. For instance a sound of a waterfall that you would hear louder as you get closer to the waterfall. This could be very neat for the waterfall, torches in the caves, river, and maybe other areas as well.
Maybe also some ambient sounds, that aren't bound to a location but to an area. Like wind, singing birds, cave sounds (you know those eery sounds and dripping water) and such.

Posted: 08 Oct 2007, 10:58
by Rotonen
AFAIK we could use the stock SDL doppler effect for this. We just have to be careful to make it subtle enough not to make it sound like you're moving at insane speeds.

Also I'm not aware of relative location tracking in our client in regard of everything, so we should probably think about this a bit and not be in a hurry.

Posted: 08 Oct 2007, 16:37
by Modanung
Doppler effect? Why would we need that? The player doesn't walk that fast. And so far nothing does.

Posted: 08 Oct 2007, 16:43
by Crush
Does SDL_mixer support stereo sound (varying the volume of the left and the right stereo channel for single sound effects)?

Posted: 09 Oct 2007, 08:03
by ElvenProgrammer
Crush wrote:Does SDL_mixer support stereo sound (varying the volume of the left and the right stereo channel for single sound effects)?
Not directly but we could use:

http://jcatki.no-ip.org/SDL_mixer/SDL_mixer.html#SEC76

and store sound sources in the map files.

Posted: 09 Oct 2007, 20:42
by Rotonen
Modanung wrote:Doppler effect? Why would we need that? The player doesn't walk that fast. And so far nothing does.
Pseudo 3D sound. Kind of like how they achieved it in quake2 engine games. Works intuitively and amazingly well.

If we really want to go into positional audio, there is always OpenAL.

I might be alone on this one, though.