Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Possible frame rate reduction because of 3D Sound...?

Author
Message
Dr Crazy
21
Years of Service
User Offline
Joined: 13th Apr 2004
Location:
Posted: 20th Aug 2004 03:19
3d sound...its a great thing. It can add effect to your game, and give it more realism. But (there's a big BUT), can it slow do your game? Think about it, it has to keep positioning the sound at the object's location. And it will probably take more calculation too because if you were to code it in let's say C++, you would have to do some math commands so like 'if you get closer to the sound then make sound louder'.
Have an expirement and see what you think...

Who dares; wins.
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 20th Aug 2004 04:16 Edited at: 20th Aug 2004 04:17
well it would only put load on your sound card so shouldent effect the fps of your game to any extent, unless your sounds take up loads of ram,

but the calculations for the sound are very simple

Dr Crazy
21
Years of Service
User Offline
Joined: 13th Apr 2004
Location:
Posted: 20th Aug 2004 05:03
yea but it takes processing power coz it is continually calculating the difference between YOU + the sound.

1.9GHZ/Windows XP Home Edition/NVidia GeForce4Ti 4600/128MB RAM/60GB Hardrive
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 20th Aug 2004 05:23
it will probably look like this (only way more advanced)





Dr Crazy
21
Years of Service
User Offline
Joined: 13th Apr 2004
Location:
Posted: 20th Aug 2004 18:08
See. It will take up processing power still. It has to calculate the distance between you + the object. And has to keep positioning the sound at the object's location. I reckon you would lose 3/4 frame rate everytime you load a 3dsound.

1.9GHZ/Windows XP Home Edition/NVidia GeForce4Ti 4600/128MB RAM/60GB Hardrive
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 20th Aug 2004 22:39 Edited at: 20th Aug 2004 22:52
Ofcourse it takes up processing power. But believe me, it's allmost nothing. If calculating the distance between you + the object/sound costs 3/4 frame rate, allmost no games would exist. The distance calculation is used in Math-Collision, RTS games (if range > distance then attack target), etc.

Here, try this example (you'll have to find and replace the 2 wav's though)


works in dbc and dbpro



Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Aug 2004 22:54
I would'nt worry about 3D sound too much, it does'nt seem to cost that much in terms of performance, and it's so much less hassle - it'd probably be slower to check the distance and adjust the volume and pan in DBPro than it would to simply position your 3D sound. It is a good idea to allow non-3D sound too though, like as a user option, I've had some compatability issues using 3D sound.


Van-B


Muhahahahaha.

Login to post a reply

Server time is: 2025-05-25 10:28:58
Your offset time is: 2025-05-25 10:28:58