speed of sound

Suggestions from our community members for PR:BF2. Read the stickies before posting.
zangoo
Posts: 978
Joined: 2007-09-01 03:42

speed of sound

Post by zangoo »

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
Last edited by zangoo on 2008-09-29 13:24, edited 1 time in total.
Ballistics or Tracers? Please Vote
[DM] member, We are now recruiting!
Xfire:Zangoo
Scot
Posts: 9270
Joined: 2008-01-20 19:45

Re: speed of sound

Post by Scot »

ARGH!! MATHZ!! BRAIN EXPLODEE!!!

But yeah, if it's as simple as changing one line of code, why not?
Image
Scot
Posts: 9270
Joined: 2008-01-20 19:45

Re: speed of sound

Post by Scot »

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.
Image
DeltaFart
Posts: 2409
Joined: 2008-02-12 20:36

Re: speed of sound

Post by DeltaFart »

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

Post by Jaymz »

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.
"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

Post by DeltaFart »

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

Post by Jaymz »

DeltaFart wrote:cant you make it have a sound delay then?
Nope. It's not that simple.
"Clear the battlefield and let me see, All the profit from our victory." - Greg Lake
hiberNative
Posts: 7305
Joined: 2008-08-08 19:36

Re: speed of sound

Post by hiberNative »

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?
-Image
Gaven
Posts: 349
Joined: 2008-08-31 14:31

Re: speed of sound

Post by Gaven »

Nice catch.
crazy11
Retired PR Developer
Posts: 3141
Joined: 2008-02-05 00:20

Re: speed of sound

Post by crazy11 »

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?
He was probably doing one of his crazy projects like the ballistics.
Image
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

Post by WildBill1337 »

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

Post by Jaymz »

WildBill1337 wrote:is there a way to make automatic weapon sounds have the correct speed? its just one of those irritating things.
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.
"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

Post by Proff3ssorXman »

We want MOAR DAMMIT!!!

Nah, sounds sweet tho - the closer to realism the better
zangoo
Posts: 978
Joined: 2007-09-01 03:42

Re: speed of sound

Post by zangoo »

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.
Ballistics or Tracers? Please Vote
[DM] member, We are now recruiting!
Xfire:Zangoo
Waaah_Wah
Posts: 3167
Joined: 2007-07-26 13:55

Re: speed of sound

Post by Waaah_Wah »

'[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 :33_love: Jaymz
Harrod200
Posts: 3055
Joined: 2007-09-07 12:08

Re: speed of sound

Post by Harrod200 »

Waaah_Wah wrote:
/agree
404: Signature not found
Hitperson
Retired PR Developer
Posts: 6733
Joined: 2005-11-08 08:09

Re: speed of sound

Post by Hitperson »

wait a min speed of sound is 330ms-1
Image
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."
Post Reply

Return to “PR:BF2 Suggestions”