Quote:Original post by EvilKnuckles666
well, of course i make FrameDelay = timeGetTime() at the beginning of every frame. and it looks choppy like it moves fast then slow then fast then slow and i can actually see that happening. not really the frames, but it's not moving smoothly like i want it
i know but say you have 10 sprites you going to be multiplying each one by FRAMEDELAY whish will probably always be GetTickCount()-FrameDelay
so it will be:
Sprite 1: step value * (GetTickCount()-FrameDelay)
Sprite 2: step value * (GetTickCount()-FrameDelay)
Sprite 3: step value * (GetTickCount()-FrameDelay)
Sprite 4: step value * (GetTickCount()-FrameDelay)
Sprite 5: step value * (GetTickCount()-FrameDelay)
Sprite 6: step value * (GetTickCount()-FrameDelay)
Sprite 7: step value * (GetTickCount()-FrameDelay)
Sprite 8: step value * (GetTickCount()-FrameDelay)
Sprite 9: step value * (GetTickCount()-FrameDelay)
Sprite 10: step value * (GetTickCount()-FrameDelay)
but by the time you get to 10 GetTickCount will be returning a greater number than at the start so (GetTickCount()-FrameDelay) will work out to be a bigger number by the end of the frame then at the start.
What you need to do is measure the difference between frame times
so like at the start of each frame have:
oldframetime = newframetime;
newframetime = GetTickCount();
framedelay = newframetime - oldframetime;
Quote:Original post by BosskIn Soviet Russia, you STFU WITH THOSE LAME JOKES!