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 Professional Discussion / sync rate not sync rating...

Author
Message
the architect
23
Years of Service
User Offline
Joined: 6th Jan 2003
Location: United Kingdom
Posted: 22nd Mar 2003 16:00
When I set the screen sync rate to 35 it still reads 60+

This means my game is not running smoothly. My gun fires at various rates and by no means could I release a pro game that ran like this. Any ideas. I am putting sync on etc

Didnt have this problem in DBC.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Mar 2003 16:14
Several things to consider here:

1) Using SYNC RATE [n] has never been entirely accurate. It's linked to your monitor refresh rate. I would assume that yours is set to 70Hz. Mine is set to 60Hz (laptop).
2) SCREEN FPS() has a bug - if you use it twice it will show you double the actual number.

If you really do need a fixed sync rate, then use something like this:

Spikenspan
23
Years of Service
User Offline
Joined: 20th Feb 2003
Location:
Posted: 22nd Mar 2003 17:12
I'm doing some development on a laptop with a GeForce4 440 Go and setting different refresh rates (60,75,85 or 100) has absolutely no impact on the FPS() command, wether running under exclusive mode or not.

If the "sync rate" is really linked to the monitor refresh, that test means that:
A) Setting the refresh rate on a laptop is irrelevant, it remains at 60hz or whatever
OR
B) DBP overrides the current refresh rate when initializing the resolution

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 22nd Mar 2003 17:32
Really you should be setting the sync rate to 0, to get the maximum speed out of it...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Mar 2003 18:05
Spikenspan:

The refresh rate has absolutely nothing to do with what graphics card you have, and everything to do with your monitor/display and directx.

- All laptops that I'm aware of refresh at 60Hz (on their built-in displays at least).
- DirectX chooses the refresh rate unless your program specifies one (DBPro does *not* specify).
- DirectX will not allow a refresh rate for your monitor that it cannot verify from your monitor drivers. Doing so could cause damage to your monitor.
- To get frame rates in excess of your refresh rate you should instruct DirectX to *not* wait for vertical sync within your advanced display properties. Warning: This could result in 'tearing' which will become most noticable when a lot changes in your display.

Although it's harder to code, we should all be doing as MrTAToad says and get our code to adapt to the actual sync rate of the game, instead of trying to fix a specific sync rate.

It you look back through the history on the DBPro discussion forum you will find many examples of exactly this discussion, and how to do it.
Spikenspan
23
Years of Service
User Offline
Joined: 20th Feb 2003
Location:
Posted: 22nd Mar 2003 18:33
I was using "sync rate 0" before patch 4, but since the upgrade I have to rather use a specific rate i.e. "sync rate 60" when running fullscreen exclusive mode to avoid an annoying rendering lag.

Anyways, I guess I'll keep track of FPS with a custom routine from now on.

the architect
23
Years of Service
User Offline
Joined: 6th Jan 2003
Location: United Kingdom
Posted: 23rd Mar 2003 01:13
I am shocked to find that screen fps() is buggy! I hope that is not true. Thanx for the replies>

Login to post a reply

Server time is: 2026-07-10 10:19:45
Your offset time is: 2026-07-10 10:19:45