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.

Newcomers DBPro Corner / Sync Rate increases FPS when Sync ON ???- Q for a Pro

Author
Message
Programmer for Christ
21
Years of Service
User Offline
Joined: 15th Nov 2002
Location: United States
Posted: 11th Dec 2002 07:56
Can anyone explain to me why I get a better FPS if I put Sync Rate 0 in my program even though I have Sync On for programmer control

Your life is important,
Others care about you,
Especially the one who made you.
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Dec 2002 08:38
rate 0 means to go as fast as possible

sync on only activates it

sync rate sets it

eg:

sync rate 0 = fastest possible fps

sync rate 10 = 10 fps or so
sync rate 20 = 20 fps or so
sync rate 30 = 30 fps or so
sync rate 40 = 40 fps or so
sync rate 50 = 50 fps or so
sync rate 60 = 60 fps or so

Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Dec 2002 12:49
ya know what gets me is the sync rate is suppose to cap the value - so why is it so irratic even when the fastest possible is just amazing?
I mean i've done the same thing in C++ with DirectX and told it to only run the render pipeline 60times a second ... and it got a set 60, from an original 100-120fps

is it the fact that its an interpreter language that causes this? Because DBpro doesn't appear to suffer from it as much

Anata aru kowagaru no watashi!
Programmer for Christ
21
Years of Service
User Offline
Joined: 15th Nov 2002
Location: United States
Posted: 12th Dec 2002 00:24
Ok, let me see if I get this right

SYNC ON - causes the computer to sync as told in the program
SYNC OFF - darkbasic controls sync
SYNC RATE - sets the max FPS

So Sync Rate works regardless of whether sync is on or off
That helps!!

Thanks Indi

Your life is important,
Others care about you,
Especially the one who made you.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Dec 2002 01:08
The help files on Sync can be confusing.

With Sync Off, all 3D objects are drawn on the screen when your program tells them too - one at a time. This is slow when many objects are drawn.

With Sync On, the objects are not drawn to the screen until a Sync command is issued - ideally at the end of the main program loop. As all the 'draws' are syncronized with the screen refresh in one operation, this is less of a strain on the system and results in a much faster program.

The down side is that any 3D errors in your program do not show up until the screen is updated (Sync) and hence the confusing error line numbers which are nowhere near the line which is actually faulty! (Turn Sync Off to get the correct error line number).

Use the Sync Rate command to set the screen frame rate - ideal for preventing the program from running too fast on really fast machines, and as Indi says, set it to zero for maximum speed.

TDK

Login to post a reply

Server time is: 2024-03-29 06:06:13
Your offset time is: 2024-03-29 06:06:13