I send the sample but tomorrow, I am now finishing a service here.
but you understand the concept: Do not keep waiting time to complete the frame to draw, draw after the time reaches the fps.
Within the update function of my object animation I have another function called nextFrame (), this function returns TRUE if the time passed the next frame or FALSE if it is not now, then do so:
Code: Select all
if This.NextFrame() then
'' Here I draw the sprite in screen buffer
if not yet completed the frame time, it just keeps looping.
I use the same technique to LoopControl() function to draw the buffer on the screen