Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Random EXACT fps cut in half [SOLVED]  (Read 2357 times)

0 Members and 1 Guest are viewing this topic.

Strikerklm96

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Random EXACT fps cut in half [SOLVED]
« on: March 30, 2014, 03:55:37 am »
While running in Windows 7, for no apparent reason, the FPS will drop to exactly half of its intended 60 FPS. It's not because of performance problems either, I can do things that normally cause the FPS to drop from 60 to ~40 because of lots of drawing, but when I do that thing, the FPS stays at 30, implying it is just running at 30 as if that were the fps cap. I found http://en.sfml-dev.org/forums/index.php?topic=1546.0, but there wasn't any helpful info.

What could be causing this?
« Last Edit: March 30, 2014, 08:36:16 pm by Strikerklm96 »

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: Random EXACT fps cut in half
« Reply #1 on: March 30, 2014, 04:32:50 am »
Do you have Vsync enabled? If so, that would explain the drop.

Strikerklm96

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: Random EXACT fps cut in half
« Reply #2 on: March 30, 2014, 05:08:49 am »
Yeah, that was the issue, the strange thing is that it only happens on laptop monitors. Everytime I hook a monitor to the laptop, there is no problem. Also, what is causing it to drop to 30? It runs at 60 for a bit, then drops to 30 for a bit, then goes back up and down. Also, my game looks bad without vsinc, what can I do?

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: Random EXACT fps cut in half
« Reply #3 on: March 30, 2014, 06:18:59 am »
The refresh rate of your monitor is 60 Hz. If the computer can't keep updating the game that fast, it lowers the frame rate so it still looks good, is essentially going on.

If doesn't look good enough for you, this is where you either begin optimizing, or you call it your lowest supported spec.

Strikerklm96

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: Random EXACT fps cut in half [SOLVED]
« Reply #4 on: March 30, 2014, 08:35:54 pm »
My game specs were actually pretty low, which is what was confusing me, the problem was that if the window is not in a native resolution of the monitor, AND OR not in fullscreen mode, then it starts having trouble.

But if it's in fullscreen mode, with the resolution equal to the monitors resolution, then it pretty much never drops below 60, unless I purposefully induce it. That should be added somewhere as a tip for when using Vsinc.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
AW: Random EXACT fps cut in half [SOLVED]
« Reply #5 on: March 31, 2014, 07:56:41 am »
It's an "implementation" detail of the graphics driver and is different for many setups.
VSync simply guarantees that it's in sync with the monitor's refresh rate.

There might be some dynamic refresh rate changes or similar in your driver settings. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/