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.

Dark GDK / The horrible dillema with DarkGDK framerates

Author
Message
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 14th Aug 2009 22:51
So, first off, I'm a total newb to GDK. I've been using DBP for about 4 years now, and I decided it was time to make the switch.


Here is my insane problem.

Take a look at my code first:


I understand that GDK has a Vsync framerate barrier of 60fps.

But the insane part is- I get a solid 30fps when running that code!

So I tried to re simulate this is exact code, but instead in DarkBasic Pro.

Here is my DBP code...



And wa-la! I was successful. I get the exact same, steady 30fps framerate as I did when running the similar code in DarkGDK.

I realized that the problem lied completely in the 'VSync' parameter in 'Set Display Mode'.

As you can see, in my DBP code I set the 'VSync' to 1 because that's how it is set by default in DarkGDK. That's the reason I got the same result.

So get this: I change that 1 to a 0, turning VSync off when setting the display mode in DBP, and my framerate skyrocketed to it's max, as it should with the sync rate set to 0. It went up above 100 and skedaddled around there. I could even change the Sync Rate to 60 and it would stay capped there.

I thought I figured out how to fix that cap in DarkGDK too. I just had to turn VSync off when setting the display mode.

And it turns out, with the latest version of DarkGDK and everything, the command dbSetDisplayMode doesn't have a 4th arguement for setting VSync!


So now I'm at a complete loss for what I can do about this.
I played around with it some more in DarkGDK, and these are the results I got.



DarkGDK Framerate Results (VSync on by Default)
- Display Mode 1024,768,32 + Fullscreen Mode = 30 FPS capped
- Display Mode 800,600,32 + Fullscreen Mode = 60 FPS capped
- Display Mode 1024,768,32 + Default Windowed Mode = 60 FPS capped
- Display Mode 800,600,32 + Default Windowed Mode = 60 FPS capped

The same results go for re-simulation of the code in DarkBasic Pro with VSync on (set to 1).






So, the dilemma is, I want to be able to uncap the framerate. I also want it to be in FullScreen Mode, and I need the resolution to be at least 1024,768,32... the problem is, these are the only settings that are causing that 30FPS cap for me, and the command that allows you to turn VSync off does not have that VSync parameter with DarkGDK.




Solution that I am not sure about using:
I can go into my NVidia control panel and set the VSync to 'Force Off'. Then, when I set the sync rate to 0 in DarkGDK and lower the display mode resolution, there is no 60FPS cap in DarkGDK. The thing is, I don't want this 'Force Off' to be for all the games I play as well. So I put it back to the setting with 'Let the 3D application decide' so I can find a fix for this through DarkGDK, not so it's fixed OFF for all games I play or make.




Thanks all for any help you offer.


Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 15th Aug 2009 00:46
Right, so my noobish legacy with C++ precedes me... I didn't fully update DarkGDK, and that's why I didn't have the dbSetDisplayModeVsync command to fix this all....


Sorry folks, this can be locked


supershwa
15
Years of Service
User Offline
Joined: 22nd Aug 2009
Location:
Posted: 25th Aug 2009 04:36
Right there with ya Xenocythe - I'm a scripting whiz, but C++ is my newest challenge -- glad you posted this. Good info to have.

Login to post a reply

Server time is: 2024-10-01 10:39:32
Your offset time is: 2024-10-01 10:39:32