ok so you arent doing 2d sprite animation or 3d skeletal keyframed animation, you are just moving a box across the screen.
So i'm going to have to mind read you on this cause you didnt give us very much info but i think i know whats going on.
Ok, the problem is that you are moving the box a constant amount every frame (such as 10 units lets say), but frame rate fluctuates from frame to frame based on all sorts of factors outside of your control, which makes it so that some frames might be 15ms lets say, and others are 30ms, but both those frames have the box moving 10 units, which means that the box is actually changing how fast it moves across the screen as the frame time changes.
There is a solution though!
Basically what you need to do is measure how long your last frame was, and multiply your speed by that amount when moving it ever frame.
For example here's simplistic some pseudo code:
void Main(void){ DWORD dLastFrameTime; DWORD dFrameElapsedMS; //fake the first frame dLastFrameTime = GetTickCount() - 15; //move the box at this speed float fBoxSpeed = 2.0f; while(1) { dFrameElapsedMS = dLastFrameTime - GetTickCount(); dLastFrameTime = GetTickCount(); BoxMovementSpeed = (((float)dFrameElapsedMS) * fBoxSpeed); MoveBox(BoxMovementSpeed); }}
Hopefully you understand the essence of that, but what that does is make it so that if the frame takes longer, it moves the box farther. If the frame takes less time, it doesn't move the box as far.
Make sense?