As you guys know, gun shots don't really travel very far in empires. Which is really a shame because it takes away some of the immersion of a really good firefight/battle. It will also be a good indicator of what you're up against and how far away the enemy or your allies are. Is it an easy matter of changing the sound scripts to make weapon sounds audible from a distance? Tutorial for making faded sounds --> http://css.gamebanana.com/tuts/9940 Example of the sounds --> http://www.youtube.com/watch?v=Xr1t-cHu3gE
"It will also be a good indicator of what you're up against and how far away the enemy or your allies are." I don't think the current sounds are incapable of doing this.
This wouldn't need code support if the whole distance is the in the actual sound file I wouldn't of thought?
what a simple and elegant idea to use stereo channels instead of multiple sound files or live-effects ...
Yeah actually looks like your right, I misunderstood the tutorial the first time :/ I still dont understand how this works ingame though, is someone able to explain that (i.e. how will you get the distance sound but not the main sound?) If someone took a few minutes to make one of these sounds id be happy to setup a server and help them test it (Although no doubt this will be like many simple suggestions where noone will bother)
Distance variance in Source Adding ^ in front of a sound name, such as "^weapons/explode3.wav" tells the sound engine that it is a distance based sound. The left channel of the .wav is the 'near' sound that will play when the sound originates close to you, and the right channel is the 'far' sound that will play when the sound originates far from you. If the ^ mark is not used in the soundscript the sound is treated as stereo with no directionality or distance. This is a different feature than the sndlvl entry to control attenuation. This distant variant feature allows you to play two different sounds (but using only one file) and cross-fading between the two depending on how far away the sound originates. Currently the fade distances are hardcoded to begin at 20 feet (240 world units) and end at 110 feet (1320 world units) and cannot be changed in a mod. https://developer.valvesoftware.com/wiki/Soundscripts#Distance_variance_in_Source
Seems so, I think this would add to the gameplay experience as a whole, you know, hearing a massive fuck off infantry battle in the distance, I could have a go in audacity when I've got time
Information: For anybody interested, I have made a test sound of my interpretation of how this works, you can find the new fire sound here: Path: empires/sound/weapons/nf/rifle https://dl.dropboxusercontent.com/u/6056146/fire.wav (last updated 17:12 06/06/2013) I created it in Audacity, you will also need it to open the sound and basically see what I'm seeing. My assumptions are this: The .wav sound is stereo. It has 2 tracks, the left track and the right track. It will play the left track as a MONO sound if you are close to the source. If you are far away, it will play the right track, also as a MONO sound. To find the middle ground between the 2, the sound engine crossfades between the left track and the right track depending on the appropriate distance the player is from the source of the sound. Currently the fade distances are hardcoded to begin at 20 feet (240 world units) and end at 110 feet (1320 world units) and cannot be changed in a mod. I do not know what the relative distances are ingame. You can open the sound in Audacity to see the difference between the 2 tracks. To hear the difference, set the slider to the far Left to hear the close sound and play. Then set the slider to the far Right to hear the bass-ier distance sound. If you center and play the tracks together you get a unpleasant combination of both. Now when you hear one track, you hear it in the corresponding ear right? My assumption that to prevent this ingame is that the track becomes MONO in order to make it correct. From Google: 110 feet = 33.52800 metres I've briefly tested this with Wealthysoup, and found that 1 in one scenario it may of infact worked, the new wav was definitely playing. However it seemed to either be playing as intended but distance was so short and we could barely tell if it was stereo or mono. I stood at the NF bridge while wealthy stood at the NF rax on mvalley. TL;DR --- If the distance is hardcoded at 30m/110 feet and CANNOT BE CHANGED and that the distance is so short ingame, then this is not worthwhile. Empires maps are not as tiny as cs_office. Even if we did manage to get it correctly working, we felt that it wasn't significant enough to make a clear conclusion that it was a different sound. Ground bullet impacts were louder than the distance firing sounds. I'm not a Source expert nor a sound engineer, feel free to experiment This is all speculation so far but the next step is removing the ) from ")weapons/NF/rifle/fire.wav" and replacing it with just the ^ instead because: Adding ")" in front of a stereo sound name in the soundscript such as ")weapons/m4a1/m4_shoot.wav" tells the sound engine that it is a spatialized sound; this allows the sound to emit from a specific location within the world. When not used, stereo sounds play in a fixed 2-channel orientation and cannot be panned to simulate a location. Single-channel files do not require ")" before the filename and will be spatialized automatically.
It's awesome that you put so much time into this, thanks RetroFade. I guess we'll just look into whether we can change that distance or not. If we can, awesome, we should go for this. But if not then obviously we won't be able to go for this. It's a real shame if that's the case though, this would be great for immersion.
Changing distance requires engine access. However, I always wondered if we couldn't just have a long-distance sound, a medium-distance sound and a short-distance sound. Perhaps we could use the existing sound system to crossfade from short-distance to medium-distance, and then just play the long-distance sound if the distance is really far away (no crossfading here).
What I'm thinking is this: The maximum distance could mean that at any distance the player is, that is more than the maximum, the furthest distance sound (basically just the right track) is played. The ) in the sound scripts define that the sound is playing from a specific location (e.g someone's gun). The ^ could potentially play the fire sound as some kind of global sound clientside simulating the distance. We tested client side, to gain consistency with players we could investigate using the test client if needs be. In terms of what you suggested: I don't think you can define that through the current script system we're working with. Creating 3 sounds for a corresponding set of distances might be doable, but I think it would have to be coded in to define the distances. Basically I feel that just simply removing the ) and replacing it with ^ will probably work, but I need people to test it with. I'm also going to create a whole new distance sound that is completely different just to tell if it works.
Yeah my idea would require code, but I think it'd be pretty minor. However, the difference will still be noticeable I think
I would say exhaust all the options with information available, and then see if it's enough of a desirable feature, code it in EDIT: Wealthy has messaged me saying that the cannon explosion uses ^ and everyone knows you can hear them from a mile off sometimes. I need people to help me test this ASAP.
couldn't a test-file just consist of a right track of a voice saying NEAR! and left track a voice saying FAR! ?
Well to be fair when I was gonna get round to potentially do some further testing I was going to make a test sound, not like on those lines but maybe with beeps or something. But it looks unlikely for me, I mean anyway we've pretty much identified how the system works so anyone is free to go do it.