TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

Support to detect VSYNC ON Override (from NVIDIA Panel) OR a Setup Step For New Users to Determine and Set Best VSYNC #5226

Open Ghost-l0l opened 7 months ago

Ghost-l0l commented 7 months ago

VSync can cause a very significant performance drop, It was already discussed here: https://github.com/TheGameCreators/GameGuruRepo/issues/4478

For me the difference is also huge: Screenshot_1

But most casual users don't really know how it works, so most of them will just leave it turned ON and then blame the engine for poor performance. What's even worse, when somebody builds and releases a standalone game, there's no option to switch VSync OFF, unless you go to setup.ini and set it in notepad. Furthermore, most people already have FPS limiters in their graphics software (even if they aren't aware of it). For example, I have fps limit set to 75, as that is my screen refresh, no need for another VSync on top of that.

So my suggestion is to turn it OFF as a standard - in all example maps and when new map is created it should be turned off too. It will just make much better first impression, when engine doesn't stutter for seemingly "no reason" :)

synchromesh62 commented 7 months ago

No No .. dont do that In my experience vsync on gives a much smoother experience and ideally it should be on. Without it you may get higher framerates but also the possibility of a lot of erratic glitches etc.

EDIT .. In fact this is the official word on it

When VSync is on, you get perfectly aligned frames with no glitching. When VSync is off, you get virtually unlimited Frames Per Second (FPS) but depending on your configuration, screen tearing, jerkiness or stuttering is more likely.

AmenMoses commented 7 months ago

If Vsync is broken (which it sounds like if the performance issues are real) then it should be fixed, not avoided.

Ghost-l0l commented 7 months ago

I have set global fps limit in Geforce panel, so if I turn VSync off, it gets to the maximum (for my screen) 75 fps and is very smooth.

But when I turn the VSync on, my fps drops down very significantly, gets very irregular and stuttery.

Maybe, if VSync works well for some people, but then does't work for some others (like in my case and here https://github.com/TheGameCreators/GameGuruRepo/issues/4478), then imo it should be at least explained in some way to new users, so they will have a better first impression when trying the engine.

EDIT: When I turn off the fps limiter in Geforce panel, then Max's Vsync starts to work without problems. So, yeah, it's not so much Max's fault, as it was two Vsync settings kinda clashing with each other. Still I'd say it's worth mentioning in some type of FAQ as I'm not the only one using Geforce panel.

davetgc commented 7 months ago

Nope, a bad idea. As @AmenMoses says, if this is a bug, then it needs fixing.

LeeBamberTGC commented 6 months ago

@Ghost-l0l Thanks for the deep dive, I think you hit on the issue: "When I turn off the fps limiter in Geforce panel, then Max's Vsync starts to work without problems. So, yeah, it's not so much Max's fault, as it was two Vsync settings kinda clashing with each other.". I did not know this could happen but makes so much sense, and explains some things I have also seen in my performance tests on other GeForce-integrated laptops, that is, getting 30fps when I should easily be seeing 60fps. If the VSYNC wait is happening twice, that would match up with the stats.

So not a bug, but a potential annoyance. Ideally, it would be good to detect if the NVIDIA Control Panel has VSYNC set and disable the option in MAX to respect the override. I will evolve this into a feature request with the aim of detecting the VSYNC on the system or allowing the user a setup sequence where FPS/VSYNC can be quickly tested when MAX is first run.