speed of sound
-
zangoo
- Posts: 978
- Joined: 2007-09-01 03:42
speed of sound
I am suggesting a simple change, That
sound.setProperty distance-delay-factor 1
is changed to
sound.setProperty distance-delay-factor 0.8823529
As right now the speed of sound is 300m/sec and with this change it would be the correct 340m/sec.
the mathz now for the ppl that want it.
so here is the code
rem ** Distance delay
rem ** Shortest distance from listener where distance delay will be applied
sound.setProperty distance-delay-threshold 5
rem ** Delay multiplier (1 means 1/300 s/m)
sound.setProperty distance-delay-factor 1
so (300/340)* 1 = 0.08823529
1/340 = 0.002941176
0.08823529/300 = 0.002941176
sound.setProperty distance-delay-factor 1
is changed to
sound.setProperty distance-delay-factor 0.8823529
As right now the speed of sound is 300m/sec and with this change it would be the correct 340m/sec.
the mathz now for the ppl that want it.
so here is the code
rem ** Distance delay
rem ** Shortest distance from listener where distance delay will be applied
sound.setProperty distance-delay-threshold 5
rem ** Delay multiplier (1 means 1/300 s/m)
sound.setProperty distance-delay-factor 1
so (300/340)* 1 = 0.08823529
1/340 = 0.002941176
0.08823529/300 = 0.002941176
Last edited by zangoo on 2008-09-29 13:24, edited 1 time in total.
-
Scot
- Posts: 9270
- Joined: 2008-01-20 19:45
Re: speed of sound
ARGH!! MATHZ!! BRAIN EXPLODEE!!!
But yeah, if it's as simple as changing one line of code, why not?
But yeah, if it's as simple as changing one line of code, why not?

-
Scot
- Posts: 9270
- Joined: 2008-01-20 19:45
Re: speed of sound
Nicko that's not the point, if I'm reading the post right. He is saying(i think) that by changing one line of code, we get the real life 'value' as it were for the speed of sound.

-
DeltaFart
- Posts: 2409
- Joined: 2008-02-12 20:36
Re: speed of sound
Yeah man you don't read. He's saying it's too slow.
-
Jaymz
- Retired PR Developer
- Posts: 9138
- Joined: 2006-04-29 10:03
Re: speed of sound
I'll implement this, thanks zangoo.
Just be aware, any sound with a loop count of "0" (ie, automatic fire) completely bypasses the sound delay system and travels instantly.
Just be aware, any sound with a loop count of "0" (ie, automatic fire) completely bypasses the sound delay system and travels instantly.
"Clear the battlefield and let me see, All the profit from our victory." - Greg Lake
-
DeltaFart
- Posts: 2409
- Joined: 2008-02-12 20:36
Re: speed of sound
cant you make it have a sound delay then?
-
Jaymz
- Retired PR Developer
- Posts: 9138
- Joined: 2006-04-29 10:03
Re: speed of sound
Nope. It's not that simple.DeltaFart wrote:cant you make it have a sound delay then?
"Clear the battlefield and let me see, All the profit from our victory." - Greg Lake
-
DeltaFart
- Posts: 2409
- Joined: 2008-02-12 20:36
Re: speed of sound
Dahm....Well it was worth asking
-
hiberNative
- Posts: 7305
- Joined: 2008-08-08 19:36
Re: speed of sound
question.
did you noticed the 40m difference by ear, or did you time this just to check if it was correct?
or did you stumble over the faulty code?
did you noticed the 40m difference by ear, or did you time this just to check if it was correct?
or did you stumble over the faulty code?
-
crazy11
- Retired PR Developer
- Posts: 3141
- Joined: 2008-02-05 00:20
Re: speed of sound
He was probably doing one of his crazy projects like the ballistics.hiberNative wrote:question.
did you noticed the 40m difference by ear, or did you time this just to check if it was correct?
or did you stumble over the faulty code?

You miss 100% of the shots you don't take.- Wayne Gretzky
-
WildBill1337
- Posts: 317
- Joined: 2008-08-02 21:47
Re: speed of sound
is there a way to make automatic weapon sounds have the correct speed? its just one of those irritating things.
-
Jaymz
- Retired PR Developer
- Posts: 9138
- Joined: 2006-04-29 10:03
Re: speed of sound
It was especially irritating while I was trying to hack distant sounds into the BF2 engine back in 0.7 development. What could be done, is to attach the firing sounds to the muzzle effects so that each firing sound is processed independently (this is how the distant sounds in PR work).WildBill1337 wrote:is there a way to make automatic weapon sounds have the correct speed? its just one of those irritating things.
But that means duplicating muzzle effects for every single weapon (ie, I would have no life for a week or so). It would also double the amount of audio voices PR uses, and trust me when I say we already use a lot.
"Clear the battlefield and let me see, All the profit from our victory." - Greg Lake
-
Proff3ssorXman
- Posts: 383
- Joined: 2008-03-23 08:07
Re: speed of sound
We want MOAR DAMMIT!!!
Nah, sounds sweet tho - the closer to realism the better
Nah, sounds sweet tho - the closer to realism the better
-
zangoo
- Posts: 978
- Joined: 2007-09-01 03:42
Re: speed of sound
thank you jonny for pointing out that mistake. And i didnt find this by ear, i was just looking around the files like i normally do and found this.
-
Waaah_Wah
- Posts: 3167
- Joined: 2007-07-26 13:55
Re: speed of sound
'[R-DEV wrote:Jaymz;813079']It was especially irritating while I was trying to hack distant sounds into the BF2 engine back in 0.7 development. What could be done, is to attach the firing sounds to the muzzle effects so that each firing sound is processed independently (this is how the distant sounds in PR work).
But that means duplicating muzzle effects for every single weapon (ie, I would have no life for a week or so). It would also double the amount of audio voices PR uses, and trust me when I say we already use a lot.
Never argue with an idiot, he will just drag you down to his level and beat you by experience
Killing for peace is like f*cking for virginity
I
Jaymz
Killing for peace is like f*cking for virginity
I
Jaymz-
Harrod200
- Posts: 3055
- Joined: 2007-09-07 12:08
-
Hitperson
- Retired PR Developer
- Posts: 6733
- Joined: 2005-11-08 08:09
Re: speed of sound
wait a min speed of sound is 330ms-1
Harrod200:"Fire.exe has committed an illegal operation and has been shut down"
Raniak : "Warning: May crash if fired upon."
M4sherman: "like peter pan but with tanks"
[R-MOD]Eddiereyes909 (on sim tower) "It truly was the game of my childhood and has led to me getting my degree in industrial engineering."

