Author Topic: FPS Capping issue.  (Read 4195 times)

JeongWa

  • Autococker
  • Posts: 554
FPS Capping issue.
« on: March 10, 2017, 01:38:04 PM »
Hello,

Im having an issue with the cl_maxfps command. Basicaly with the settings im using my fps goes around 300->320 and i woud like to cap it at 300.
Unfortunately what ever i use as a value to cap it after 250 to 333 does not work, they end up capped at 250.

So it is a problem because either im losing 50 FPS.. either my fps keeps moving between 300 -> 333 if i dont cap it.

(anything used as a value after 250 to 333 set my maximum fps to 250 for some reason)

Any idea ?
« Last Edit: March 10, 2017, 04:25:15 PM by JeongWa »

prozajik

  • Autococker
  • Posts: 761
Re: FPS Capping issue.
« Reply #1 on: March 11, 2017, 05:40:46 PM »
Using borderless or fullscreen? Probably nothing to do with that but still, could try both modes. Borderless is not a option you can select, the .exe has to modify to turn on the borderless flag, but windowed mode has the same effect.

You could also try using vsync, but imo it's kind of buggy in PB.

Also, is there a specific reason you want 300 FPS? Generally speaking, going lower to like 240 FPS shouldn't be noticable much (no idea about PB). Basically, try lower values, see for which ones it works.

Lastly, you can most likely cap your FPS with nvidia control panel (or amd) or by using some external tool.

Too tired to even attempt to google any of these, just throwing ideas out there. gl, leme know what worked/progress.

JeongWa

  • Autococker
  • Posts: 554
Re: FPS Capping issue.
« Reply #2 on: March 11, 2017, 08:29:23 PM »
Im always playing in fullscreen. I tried both borderless & fullscreen, i also tried multiple resolutions but i still have the same issue.

The Vsync cap my FPS to 60 which i dont want to play with.

I dont really have a specific reason to play at 300 FPS, but i just feel like its dumb to lose 50fps+ for a weird issue.

So, it seems like something is preventing my game to cap my fps in between 250 to 333 fps. Yes i can cap it higher or lower  but if higher then i'll have FPS drop and if lower i'm losing more than 50fps which is alot IMO.

My alternative solution at moment is that i capped my fps to 333 and lowered my resolution so my fps are constantly higher than 333. But i really would like to play on the resolution im used to play with with the 300 FPS cap.

Its minor as an issue, but im wondering why. The solution must be in the numbers (250,333 FPS) which i dont have any clue about.

Thank you for your help still.


prozajik

  • Autococker
  • Posts: 761
Re: FPS Capping issue.
« Reply #3 on: March 12, 2017, 04:18:37 AM »
You should try some external application to limit your fps, there is plenty of those out there, quick example: Nvidia inspector, Rivatuner.

Most likely an issue with PB so an external app could allow you to limit your fps to a specific number.

JeongWa

  • Autococker
  • Posts: 554
Re: FPS Capping issue.
« Reply #4 on: March 12, 2017, 06:26:31 AM »
Tried Nvidia inspector but the maximum value for Framerates goes to 120. (v1.9.7.3)

MSI Afterburn apparently works with Rivatuner and it has a 200 FPS limitation maximum.

Dxtory has a 120 FPS limitation too.

Seems like external app to limite framerates have a low cap overal.

JeongWa

  • Autococker
  • Posts: 554
Re: FPS Capping issue.
« Reply #5 on: March 12, 2017, 09:02:13 AM »
Apparently it is something that dp does with everyone, most likely a calculation thingy but you can check it by trying to set your maxmium fps with different values and most of the time it wont reach that value but another one specifically which kinda work like a gap.
I dont know why it is like that and i dont know if i could change it. If any captain could enlight me, that would be appreciated.

xrichardx

  • 68 Carbine
  • Posts: 295
Re: FPS Capping issue.
« Reply #6 on: March 12, 2017, 01:17:29 PM »
To cap the framerate, the game sleeps and integer amount of milliseconds. For a frame to render,
1000 / cl_maxfps->value
milliseconds have to have passed since the last frame. This is an integer division where everything after the comma is chopped off after the calculation. It works pretty well for low framerates because you don't notice the chop-off there, but for high framerates you come to the point where the integer division becomes noticeable. Bascially, 1000/cl_maxfps->value evaluates to "3" for all values from 251 to 333, so the game always sleeps 3 milliseconds there, which always gives you the same framerate.
You could try using cl_sleep to cap the framerate, but I guess this will get you the same issue. Jitspoe could probably fix that pretty easily for the next build by using microseconds there instead of milliseconds, but then again, you can never know how long it takes for the next build to be released :D For now, I guess the easiest way is to use an external tool.

Edit: The effect gets even worse for higher cl_maxfps values: 334 to 500 is the same, 501 to 1000 is the same and from 1001 on its no limit at all (or, better: no limit other than the forced 1ms frametime that always happens)

Edit 2: I missed that the cvar's value is a float which leads to floating point arithmetic, so my explanation above is wrong. The correct answer is related though: The game keeps track of how much time has passed since the last frame was rendered with an integer variable counting the milliseconds since the last frame. This counter has to go above
Code: [Select]
1000 / cl_maxfps->valuein order to render a new frame. And here, it does not matter whether you want the time passed to go above 3,01 (maxfps 333) or above 3,99 (maxfps 251). The condition will only be met after a 4msec sleep, so you'll always get the same framerate for any maxfps value between these two values. The first edit should still be correct though.
« Last Edit: March 12, 2017, 02:24:43 PM by xrichardx »

JeongWa

  • Autococker
  • Posts: 554
Re: FPS Capping issue.
« Reply #7 on: March 12, 2017, 02:29:46 PM »
External app that i tried had a low limitation . (120..200 for the most part)

The command cl_sleep make it even worse by lowering by alot my FPS shown.

I guess i'll have to deal with it until jitspoe modify it, exept if someone know an external app which can go to 300fps atleast.

Thank you for the clarification Richard, i really appreciate it.

promarijan

  • VM-68
  • Posts: 182
Re: FPS Capping issue.
« Reply #8 on: April 15, 2017, 07:08:14 PM »
There is no fix for that...
Quake2 engine in its state as it is inside PB2 always caps at straight(ish) numbers. Never lock your Fps and you are g2g!

Competitive gaming always had bruteforcing the frames in its focus.
And everything above 300fps is barely noticeable and not necessary for perfectly fluid gameplay.

And tbh if you cant get 500+ fps in paintball on most average maps then i would worry about your GPU being a decade too old for todays standards. Just my opinion

JeongWa

  • Autococker
  • Posts: 554
Re: FPS Capping issue.
« Reply #9 on: April 16, 2017, 05:02:44 AM »
Locking fps is super important if you want to get used and play with the same framerate.

Also when there are high framerates drop it can cause games to freeze specially when your GPU is not recent obviously.

Dont worry thats not your opinion but a fact, my GPU is indeed old.

About the FPS Cap on Quake2 engine, it is just how the game has been built, technically there is a fix if they change it but there is no way for it to be a priority for the game.

Anyway got it figured, thank you guys for the help once again ; ).