Page 2 of 2

Re: 60 fps?

Posted: Sun Nov 01, 2009 7:14 pm
by bartbes
It does, unless you disable vsync.

Re: 60 fps?

Posted: Mon May 31, 2010 6:40 am
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

Re: 60 fps?

Posted: Mon May 31, 2010 6:47 am
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.

Re: 60 fps?

Posted: Mon May 31, 2010 6:56 am
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.

Re: 60 fps?

Posted: Mon May 31, 2010 7:14 am
by hertzcastle
ok, thanks!x