views:

43

answers:

1

My game has delta time for frame independent movement, at 250 fps run perfectly smooth, but if i limit the fps to 60, the game slow down for a 2-4 seg every 20 seg aprox, even in small programs i have this same problem.

no memory is created or released

i comment everything i can and the problem persist

thanks and sorry for my english

A: 

how big is one "seg"? if these segments are out of synch with frames, you may have multiple segs in one frame or multiple frames between two segs.

a good way to implement frame independent movement is to make updates each frame while measuring the time elapsed since the last frame and multiplying it with the current speed. updates happen in synch with the frame rate and while movement doesn't depend on framerate.

greetz
back2dos

back2dos