VSync Issues

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
Carracer12
Prole
Posts: 9
Joined: Mon Dec 08, 2014 8:24 am

VSync Issues

Post by Carracer12 »

Hi

So I made a game a little while back (few months) and I now need to have to have it working as a demonstration. It used to work fine but when I loaded up the .love file (without updating to 0.10.0), the FPS was not obeying VSync (which should lock it to 60 FPS on my monitor). Instead it went to ~600 and as a result alot of the game is not functioning correctly. I then tried updating (which involved changing file formats for all my images as for some reason they were saved as gifs before) but no luck.

I know it's not well-coded, however it was my first attempt at a proper game and would appreciate any help getting it working again. So to clarify, what I want to do is get VSync to work again.

Thanks in advance!

~Carracer12
Attachments
BaseJumper.love
(9.97 MiB) Downloaded 97 times
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: VSync Issues

Post by Nixola »

Vsync works correctly here; did you check your driver settings? Some video drivers might be forcing their vsync settings on applications (might have happened after an update), which would cause the issue you're having. Anyway, you should do whatever you can to ensure the game will run exactly the same no matter what the FPS are.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
pgimeno
Party member
Posts: 3641
Joined: Sun Oct 18, 2015 2:58 pm

Re: VSync Issues

Post by pgimeno »

This is not directly related to your issue, but vsync is not always 60 Hz. I can configure my video mode to 60 or 75, for example, and I think 100 is fairly common.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: VSync Issues

Post by bobbyjones »

If you use setMode anywhere in your code make sure to set vsync.
Carracer12
Prole
Posts: 9
Joined: Mon Dec 08, 2014 8:24 am

Re: VSync Issues

Post by Carracer12 »

Okay guys, thanks for your help. Is there any easy way to limit FPS/"ensure the game will run the same no matter what the FPS rate"? Sorry for the newbie sounding question, been months since I last did any of this coding :P
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: VSync Issues

Post by s-ol »

Carracer12 wrote:Okay guys, thanks for your help. Is there any easy way to limit FPS/"ensure the game will run the same no matter what the FPS rate"? Sorry for the newbie sounding question, been months since I last did any of this coding :P
yes, use delta time correctly in all calculations: https://www.love2d.org/wiki/dt

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests