60 fps?

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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: 60 fps?

Post by bartbes »

It does, unless you disable vsync.
User avatar
hertzcastle
Party member
Posts: 100
Joined: Sun Jan 04, 2009 4:51 pm
Location: brighton, uk

Re: 60 fps?

Post by hertzcastle »

hi, sorry to drag this thread out of the grave, but does the vsync also sync the update speed to 60 fps? as in, if i have

Code: Select all

x = x + 2
on one computer, will it stay the same speed on another? basically, i tried a little demo on a friends pc (i have mac) and the speed of things seemed slightly different? i tried delta time, but for some reason this made the game very slow (it was the same with bmax by the way). is there a way to "lock" it?
thanx.x
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: 60 fps?

Post by nevon »

hertzcastle wrote:hi, sorry to drag this thread out of the grave, but does the vsync also sync the update speed to 60 fps? as in, if i have

Code: Select all

x = x + 2
on one computer, will it stay the same speed on another? basically, i tried a little demo on a friends pc (i have mac) and the speed of things seemed slightly different? i tried delta time, but for some reason this made the game very slow (it was the same with bmax by the way). is there a way to "lock" it?
thanx.x
It will not sync the updates in the same way that using delta time does. The delta time is usually only a tiny fraction of a second, so x = x + 2*dt means x will increase by 2 every second. If you want it to be faster, make it x = x+20*dt, or x = x+200*dt.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: 60 fps?

Post by bartbes »

Yes, the units check out:
dt = seconds
speed = pixels/second
dx = pixels
dx = speed*dt
pixels = pixels/second*seconds

See? (btw, pixels can be replaced by any unit)
So, you want your speed to be the movement per second.
User avatar
hertzcastle
Party member
Posts: 100
Joined: Sun Jan 04, 2009 4:51 pm
Location: brighton, uk

Re: 60 fps?

Post by hertzcastle »

ok, thanks!x
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Google [Bot], Semrush [Bot] and 8 guests