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

Author Topic: FPS Stutter (Windows 10)  (Read 765 times)

0 Members and 1 Guest are viewing this topic.

mos

  • Newbie
  • *
  • Posts: 19
    • View Profile
FPS Stutter (Windows 10)
« on: September 05, 2016, 04:41:18 am »
Hello, I am having trouble making my game run smooth. It only runs smoothly when I don't limit the framerate. So like this:

window.setFramerateLimit(0);
window.setVerticalSyncEnabled(false);

I change any one of those then you can see some jitter. If I set the framelimit to 60 or turn vync on and display the FPS, you can see it jumping around from 20-65 and sometimes to the thousands.

With the help of jagoly in irc, we were able to implement a fixed timestep and it the stutter less noticeable. However, it is still there on my machine at least. jagoly tested it on his machine and it ran smooth for him no matter if the fps was limited or not.

Why is it not like that on mine? I'm running Windows 10 64bit with a Nvidia GTX 970. Vsync works in other applications just fine for me. Here's my code:

Game.h: https://gist.github.com/anonymous/eccb8b49d41581dcb4062d0a917aac15
Game.cpp: https://gist.github.com/anonymous/92fc02ad0e1aff55deb9682244c1f6c1
Player.h: https://gist.github.com/anonymous/40e2bf3bc4f2d812db34f2e10b8afa12
Player.cpp: https://gist.github.com/anonymous/655f2fd6f7debedfe21974ef89f97af9

Whole project if you want to run it: https://dl.dropboxusercontent.com/u/735021/FPStutter.zip

Any help would be appreciated. Thank you!

 

anything