Page 1 of 1

strange FrameRate sync. issue,. .

Posted: Thu Mar 15, 2012 1:48 pm
by jph_wacheski
This may not be a 'bug' with zge, but it is making it impossible for me to use it.

I couple day ago AMD auto-updated my video drivers, (now 12.3). Since the update I am experiencing horrible ripping and tearing, no mater what settings I use the frame refresh seem unable to synchronize. I have tried many setting in the 'Catalyst Control Center' as well as all the options in zge. I am not having this problem with any other software, so this is why I am reporting it here.

Any ideas ?

Posted: Thu Mar 15, 2012 1:59 pm
by VilleK
That does not sound good :(
I wonder what the reason is because ZGE only use standard OpenGL double buffers followed by SwapBuffers call at end of frame. Nothing special at all.

"Wait for vertical retrace" setting in GPU control panel makes no difference?

Posted: Thu Mar 15, 2012 2:08 pm
by Kjell
:?

I've always had this problem too, both on my last and my current computer. The only thing that works for me is to set the App.FrameRateStyle to Free ( and force VSync to on* in my Windows Control Panel ) .. anything else will cause ZGE executables to run at 60 fps, while my monitor doesn't ( causing tearing ).

*If i don't, it will eat up all GPU power and run at 1000+ fps, which is nice for benchmarking, but not for regular use.

K

Posted: Thu Mar 15, 2012 2:26 pm
by jph_wacheski
Yeah, I set that to "always on" seems to make no difference. (tried all the other settings as well)

There is also an openGL triple buffering tick box and that has no noticeable effect either.

I don't see the tearing in free mode, however everything moves so fast that it is hard to tell. Ok, I just made some tests using the 'free' setting (and app.deltatime to get a playable speed) and that seems to be be workable. (thanks Kjell)

My larger concern is not knowing how the games will work on other peoples system?

Posted: Thu Mar 15, 2012 2:46 pm
by Kjell
Hi jph,
jph_wacheski wrote:My larger concern is not knowing how the games will work on other peoples system?
Indeed .. this is a critical "bug" that has been reported and should have been resolved a long time ago. Debug Formulation for example doesn't run at the native refresh rate of my monitor, so it looks choppy* and has tearing.

*Unless you meant to have it run at 60fps only of course.

K

Posted: Thu Mar 15, 2012 2:59 pm
by VilleK
Choosing "Free" is not a good workaround, it will eat 100% cpu on computers that do not have vertical sync on, as mentioned.
I remember we did try to fix this before but there was problems with that many monitors do not report the actual frame rate.
Please help googling for reference to how to fix it in a stable way. I know even big budget games such as "Rage" and "RE 5" have had tearing issues so it clearly isn't so simple to get right.

Posted: Thu Mar 15, 2012 3:21 pm
by jph_wacheski
Ah, Kj you are right! I have that one set to 'fixed' @60. I believe I did that to stop some choppiness I was getting previously. However now with these new display drivers I get choppy performance wither way. I will set it to SyncedWithMonitor for the next update.

Ville- I will look into how others are dealing with the problem of differing refresh rates and let you know if I discover anything useful.

Posted: Thu Mar 15, 2012 3:28 pm
by Kjell
Hi guys,
jph_wacheski wrote:I will set it to SyncedWithMonitor for the next update.
That's the thing, SyncedWithMonitor never worked properly for me.
VilleK wrote:Choosing "Free" is not a good workaround, it will eat 100% cpu on computers that do not have vertical sync on, as mentioned.
You're right, i accidentally said GPU instead of CPU :oops:
VilleK wrote:I remember we did try to fix this before but there was problems with that many monitors do not report the actual frame rate.
Please help googling for reference to how to fix it in a stable way.
Regarding detecting the refresh rate of a monitor, attached is a example with two methods that work on my system ( read the documentation on MSDN on how to properly use the functions ).

K

Posted: Mon Mar 19, 2012 3:05 pm
by VilleK
ZGE has been using the EnumDisplaySettings-method for a long time. However I tried changing a couple of things that could improve timings.

Please try this beta updated today:

http://www.zgameeditor.org/files/ZGameEditor_beta.zip

Then run the attached project where I added the display of current FPS to Kjells test-project. On my computer all tree values display "59", which is also the value the control panel show is my current monitor refresh rate. What values do you get?

Posted: Mon Mar 19, 2012 3:15 pm
by Kjell
Hmm,
VilleK wrote:ZGE has been using the EnumDisplaySettings-method for a long time.
In that case ZGE probably does detect the refresh rate properly, but something else is wrong causing it not to match that during playback.

Attached is a screenshot taken from the editor and from a standalone.

K

Posted: Mon Mar 19, 2012 5:14 pm
by VilleK
Ok, please download the beta again and test once more. I changed the second parameter in EnumDisplaySettings to -1 just like your example. It was zero in ZGE before. Maybe that helps?

Posted: Mon Mar 19, 2012 5:39 pm
by Kjell
Hej Ville,
VilleK wrote:I changed the second parameter in EnumDisplaySettings to -1 just like your example. It was zero in ZGE before. Maybe that helps?
Yep, that did the trick :) For the standalone at least, no change in the editor preview ( but that's the less important one obviously ).

K

Posted: Mon Mar 19, 2012 7:16 pm
by jph_wacheski
I just rolled back those drivers till I have time to figure out what the problem is with them. This seems to be working well, and I dig the new icons I had not see that yet!