Author Topic: Sounds from other players and NPC's  (Read 1361 times)

tsharky87

  • Traveller
  • *
  • Posts: 16
    • View Profile
Sounds from other players and NPC's
« on: November 06, 2008, 03:41:47 am »
How hard would it be to be able to hear the sounds (footsteps, combat, NPC monsters growling at you) from other players and NPC's? I'm sure all of the sound files would have to come with the client and not be streamed (because of bandwidth), but this could be part of the whole "proximity" idea. For example, you'd only be able to hear players and NPC's that were, say, 20m away, and only very faintly. Then simply based on your distance from them you could increase the dB level linearly from the distance until a minimum distance (like say 3m) where the dB level would max out. The only bandwidth you'd need really is for the server to relay to the correct nearby players what sound the other players and NPC's are making and when. This might only require a tiny bit more work on the server end, and a little more on the client end, it seems. Also, if you wanted to get even cooler, you could have the client play the sounds correctly in stereo based on the sounds' source. Whaddya think?  :woot:

Satha

  • Hydlaa Resident
  • *
  • Posts: 98
    • View Profile
    • Satha's Quarter
Re: Sounds from other players and NPC's
« Reply #1 on: November 06, 2008, 03:53:48 am »
I think it sounds pretty cool, no idea how plausible it is at this point though. Hopefully they can do something like this eventually!
*Signature Pending*

Entevir

  • Hydlaa Resident
  • *
  • Posts: 168
    • View Profile
Re: Sounds from other players and NPC's
« Reply #2 on: November 06, 2008, 12:13:33 pm »
This would actually be pretty much a must at some point. Also this would be great to allow for more careful player's to move about unnoticed and unheard. Emphasis on the unheard in this case.

Definitely on the things that i really want to see in the end release.
If I stand on the axis of the world will you mind if I say that the world revolves around me ?

khoridor

  • Hydlaa Citizen
  • *
  • Posts: 352
    • View Profile
Re: Sounds from other players and NPC's
« Reply #3 on: November 06, 2008, 02:32:31 pm »
OpenAl does 3D sound. I'm sure more sound has always been planned for the game. Just a question of time... Remember that footsteps, for example, use many samples depending on the type of floor you are on, which means giving attributes to areas, etc. So, technically doable, but time and manpower needed.

neko kyouran

  • Guest
Re: Sounds from other players and NPC's
« Reply #4 on: November 06, 2008, 04:55:00 pm »
It'd think it'd be client side sound rendering with it taking the relative position of where the object making the sound is gotten from the reported position of the object in basis to the players toon from the server.  so nothing new for the server, just another process to run off the client side.

oh and becuase i can:  http://www.youtube.com/watch?v=_p6a7CiP2bM

tsharky87

  • Traveller
  • *
  • Posts: 16
    • View Profile
Re: Sounds from other players and NPC's
« Reply #5 on: November 14, 2008, 09:14:53 am »
Ok, so lets say I wanted to add a feature to the game of footstep sounds that change according to the terrain the player is on (could just be a new database connected to the existing graphical world database for simply what kind of terrain at a specific point in the world). Can someone who already has a lot of knowledge with the PS source give me a general idea of what I would need to change to accomplish that? Like, where are the relevant classes and roughly what would I need to do? I don't want to use up someone's time too much because I'd be doing this so they wouldn't have to, but it would save me a hell of a lot of time if someone took a moment to tell me this information. Thanks a lot!  :thumbup:

khoridor

  • Hydlaa Citizen
  • *
  • Posts: 352
    • View Profile
Re: Sounds from other players and NPC's
« Reply #6 on: November 14, 2008, 09:52:14 am »
The heaviest work is not on the programming side.OpenAl (I believe that's what is used) is already initialised in the client, and sounds generated on the fly (for example when you cast a spell). Therefore, all what is needed is, somewhere in the movement process, to test for a given material flag (at about the same time the collision test is made to see if you're walking on something or not). According to that flag, and the character speed, you generate a sound (designed to be synchronised). Well, even better if the sound also takes into account what kind of shoes you are wearing, if any.

You do have to check if the client generates the sound then sends the info to the server, or if the server makes the choice then tells the client to generate the sound. In the latter case, you may not be able to achieve anything. To find out which classes and methods are used, I would inspect the code that deals with spellcasting; your sound code would be pretty similar.

The problem is, to be effective, the entire world has to be map-flagged with a sound property. That's quite some work for the setting team.
Well, in the mean time, you can always prepare your client for generic sounds, generated on any floor; but you'll end up hearing only your own footsteps if the server is unaware of it.

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Sounds from other players and NPC's
« Reply #7 on: November 14, 2008, 01:55:56 pm »
That's quite some work for the setting team.

Then why do we have a sound team? Settings has nothing to do with where sounds appear ingame, they work on npcs and things around them. Also spells are pre selected to have sounds in the same way the maps are currently, to have dynamic sounds would take a lot of time to work on.

Mythryndel

  • Testers
  • Hydlaa Notable
  • *
  • Posts: 605
    • View Profile
Re: Sounds from other players and NPC's
« Reply #8 on: November 14, 2008, 04:25:34 pm »
random ambient sounds depending on map and time of day? I like the idea in general. Go near Harn's and hear people hammering on an anvil, or travel BDRoad at night and hear crickets and such... during the day hear birds chirping...