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, fastsync and sync combination failure

Author
Message
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 23rd Mar 2012 10:53 Edited at: 23rd Mar 2012 10:54
Hi.
My pseudo (source is huge) code is like this:

FRAPS and "screen fps()" says 45

What Iam doing wrong?
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Mar 2012 13:44
Quote: "What Iam doing wrong?"


Don't know. But shouldn't this



be this



?

I can't reproduce your problem. I get a steady 27-30 with this:



Perhaps fraps is counting the fastsyncs as well? What does DBPro report? An FPS around 10 or 11 perhaps?
Millenium7
21
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 23rd Mar 2012 15:17
I had the same problem and I think the solution (which you already have in your code) was to set vsync on

Check it's not being forced off in your graphics card options
Another temporary workaround would be to include a check that runs every 1000ms to see if the FPS rate is higher than 61, and if it is then reduce the sync rate by 1
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 23rd Mar 2012 20:50 Edited at: 23rd Mar 2012 20:51
Vsync forced on.

The fun thing is, that I've run GG's example on other PC and it worked properly. Maybe there is something I missed in my code, that has influence on framerate. I'll check tomorrow. But definetely I am using sync scheme as Green Gandalf posted. ~Mystrey~

edit:
I can understand if I have LOWER framerate than was set, bu HIGHER?!
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd Mar 2012 21:15 Edited at: 23rd Mar 2012 21:17
I'm pretty sure setting a sync rate just causes the code behind 'sync' to wait for a set period of time. It's probably using a timer which isn't accurate on your machine in that specific scenario.

If you need a fixed 30fps, you could probably code it yourself with PERFTIMER(), e.g.



Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Mar 2012 21:56
Quote: "I can understand if I have LOWER framerate than was set, bu HIGHER?! "


As I suggested before, perhaps FRAPS is counting the fastsyncs as well, so if your sync rate was 11 (excluding fastsync) then FRAPS might report 44 if it was including the fastsyncs. Just a guess as I don't know what FRAPS does.
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 23rd Mar 2012 23:17
@Fallout
Perftimer works 100%!!! Thanks!

@Green Gandalf
Just uninstalled FRAPS. Nothing changes.
Also I have noticed (in short):
sync rate 30 = result 30-45
sync rate 60 = result 60-75
~60 on maximum "in screen" objects.
both times +15 frames!
In my engine I am using this scheme:
Quote: "1. camera 1 - texture (objects)
2. camera 2 - depth (objects)
3. camera 3,4 - super bloom (render quads)
5. paste image 4 (I think it better than make one more quad IMHO)
6. sync camera 0 (pasted image + text)"

So I want to know, why such things happens.

P.S. My own PC did 30 FPS with your code. So it works correct.
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd Mar 2012 23:38
No problemo. I love PERFTIMER().

Login to post a reply

Server time is: 2026-07-10 12:22:27
Your offset time is: 2026-07-10 12:22:27