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 / dbsyncRate doesn't work

Author
Message
Master Xilo
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 31st May 2008 02:49
dbsyncRate doesn't work.

The max framerate is always = monitor refresh rate
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 31st May 2008 11:49 Edited at: 31st May 2008 13:19
Works fine for me. Make sure you are a) using "dbSyncOn();" as well as "dbSync();" in your main loop.

Try this;



...and see if it works. It should hover around 33-34 FPS. If it doesn't, I have no idea why not =P

Cheers mate!

EDIT - Ah, looking at Windowkillers post, I think he's right. Are you setting the sync rate to 0? In which case, it will go as fast as it can which is, tada!, the monitors refresh rate.


Tux is my guildmaster.
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 31st May 2008 13:30
from elsewhere:

Unraveling the mystery of VSYNC
http://www.d-silence.com/video/vsync1.shtml

"...in order to receive Microsoft's WHQL certification, this option
cannot be available. Microsoft does not want Direct3D games to
be played without VSYNC."

Master Xilo
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 31st May 2008 18:25
so how could they test that dgdk is faster than dbp:
http://gdk.thegamecreators.com/?f=darksdkvsdbpro

???

If it doesn't work, I won't use DGDK: I want to see what makes my game slower and if it's faster than dbp.
Master Xilo
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 31st May 2008 18:33 Edited at: 31st May 2008 18:44
oh, and with their example at the same place, I get 15 fps with DBP and 18 with DGDK, not 27.

Am I doing something wrong? Could anyone else please test this?

EDIT: But if I use
int d = 1 + ( rand() % 100 ) ;
instead of
dbRnd(100);

I get 46 fps!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 31st May 2008 18:48
Quote: "oh, and with their example at the same place, I get 15 fps with DBP and 18 with DGDK, not 27."


This doesn't bode well for me. I only get 7-8 FPS out of that with DGDK.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 31st May 2008 18:55 Edited at: 31st May 2008 18:56
This didnt always use to be a problem in dgdk, only with later directx's has this come along. So their original tests are accurate. To not use DGDK just because you cant see a framerate above 60 is.. well, daft to use the nice word.

Take the word of long term programmers - you can create faster code with c++/dgdk than you can dbp. Its just that simple. As for the little test they gave: bare in mind to begin with that you are, by default, running in debugging mode with a debugger attached to your program. Their is a noticiable rise in fps for compiling a release build with the code optimisation setting switched to "speed"

Though to be honest I have no idea why they wrote their test code like that. The main reason DGDK is so much faster is that you have many more options in HOW you write your code - you have more power and more flexibility. The burden is on YOU to write FAST code however - you've got the tools, you just need to know how to do it.

A much faster way to write the same program they used in c++ is:



This gives me 27 fps in debug mode. The slowdown here is the thousands of calls to "rand" (or originally dbRand) per frame. Its not the quickest calculation and thousands of times per frame is excessive! But still, using the flexibility of c++ to write that program in a slightly different way as shown above has already near doubled the speed.

Thats why dgdk is better.

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 31st May 2008 18:55
Quote: "But if I use
int d = 1 + ( rand() % 100 ) ;
instead of
dbRnd(100);

I get 46 fps!"


And when I do that I I go from 8 to 11 frames. My CPU is 2.4 GHZ and my video adapter is a RADEON 9200 SE AGP with 128 Meg of RAM. Is something not up to snuff here?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 31st May 2008 18:59
Quote: "A much faster way to write the same program they used in c++ is:"


Well, that bumped me up from 11 to 15 FPS, almost double the original test. But I see no significant difference between debug and release compilations.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 31st May 2008 19:00
whilst setup for a release build goto the properties of the project, c/c++ and then Optimisation and set Optimisation to Maximize Speed and see if it makes any noticiable difference

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 31st May 2008 19:05
Nope. Still didn't make a difference.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 31st May 2008 19:12
ohwell xD I found it makes massive differences in real-world applications and games. Food for thought at least

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 31st May 2008 19:21
Kewlsome. Naturally I'm not going to be using rand() too often. Besides, what was that being used for other than to slow it down. If I remove that portion I go up to about 55 FPS.

Most, if not all of my development, will be in 2D so it's not that big a deal for me. But I'd still like to know that I've got reasonably capable hardware.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 1st Jun 2008 12:38
Sephnroth, you suggest to compile using the Optimize for Speed option.

Is this better than using Optimise for both (speed & size) ?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Jun 2008 17:46
Quote: "Is this better than using Optimise for both (speed & size) "


Optimizing for both will get you a trade-off for both and thus something in between each.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-09-29 21:32:44
Your offset time is: 2024-09-29 21:32:44