Help with FPS capped at 20 for Love2D.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Kemo_III
Prole
Posts: 2
Joined: Sat Sep 22, 2018 8:15 am

Help with FPS capped at 20 for Love2D.

Post 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
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re: Help with FPS capped at 20 for Love2D.

Post 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})
Kemo_III
Prole
Posts: 2
Joined: Sat Sep 22, 2018 8:15 am

Re: Help with FPS capped at 20 for Love2D.

Post 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.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Help with FPS capped at 20 for Love2D.

Post 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 )
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests