Page 1 of 1

Help with FPS capped at 20 for Love2D.

Posted: Sat Sep 22, 2018 8:21 am
by Kemo_III
Originally, I noticed the issue with the pong game from the first lecture of GD50, where the FPS is capped at 20FPS.
I tried creating a main.lua file with only code to render the FPS, and the result is also 20. Love.exe is set to High Performance in the Switchable graphics.

I'm using Love 11.1, the latest version, and I really don't know what to do.

Here's the main.lua for the FPS renderer:

Code: Select all

function love.draw()
	 love.graphics.clear(0,0,0,1)
	 love.graphics.setColor(1,1,1,1)
	 love.graphics.print(tostring(love.timer.getFPS()),0,0)
end

Re: Help with FPS capped at 20 for Love2D.

Posted: Sat Sep 22, 2018 1:12 pm
by pgimeno
How many FPS do you get when you disable vsync?

Code: Select all

love.window.setMode(love.graphics.getWidth(), love.graphics.getHeight(), {vsync = false})

Re: Help with FPS capped at 20 for Love2D.

Posted: Sat Sep 22, 2018 8:40 pm
by Kemo_III
Ok, setting the vsync to false did solve the problem in the test code(I had to change something in the push library to make it work in the assignment code because changing the vsync there didn't do anything), but I have to ask: Why does vsync limit the FPS to 20? Clearly my monitor's refresh rate isn't 20Hz.

Re: Help with FPS capped at 20 for Love2D.

Posted: Sun Sep 23, 2018 5:22 am
by zorg
I have 6 screens, most of them have a refresh rate of 75 Hz, one has 59 Hz for some reason, and one has 144 Hz. All of this driven by two GPUs. Vsync works for all but one of them; one of the 75 Hz ones is detected, for some ungodly reason, to have a refresh rate of 4 Hertz. I have zero clue as to why that is.

On your end, it might be a similar issue, and it could be a driver issue, or anything, basically.

(Yes, this wasn't too helpful a post :3 )