2

I recently started using LWJGL to get into game programming in Java from C#, and I have a basis for the game I am making set up and working, but there is a small problem with lag. The game runs at a constant 60 fps but every few seconds all of the moving entities on the screen will jump a small but noticeable amount. I researched on Google to see if anyone else was having trouble with this, and I found a thread talking about the sync function in Display not being accurate. Is this true? How can I fix this problem?

tcoy
  • 179
  • 1
  • 3
  • 11
  • Are you also using `Display.setVSyncEnabled([boolean])` ? and does the lag spikes also occur if you don't use `Display.sync([int])` ? – vallentin Nov 20 '13 at 15:58
  • I tried Display.setVSyncEnabled([boolean]) and it causes more lag. – tcoy Nov 20 '13 at 16:25
  • Then it's probably your computer that can't handle it. Thereby lag coming from rendering latency. – vallentin Nov 20 '13 at 17:02
  • My desktop is a higher end gaming computer, but Ill review my drivers and such. I found a forum thread similar to my problem [here](http://lwjgl.org/forum/index.php?topic=4449.0). – tcoy Nov 20 '13 at 17:42
  • What happens if you disable VSync? – Anubian Noob May 29 '14 at 22:37

0 Answers0