I started writing my own simple 2D engine in c++ and SDL and everything worked out great until i tried to implement Frame Independent Movement.
I wrote a simple motion function that moves the object with given speed per second((current time - previous move time)/1000 * The Speed). Then I call it it the main loop inside a while. The function itself is buggy but that's not my problem.
The problem is that when i start the program the object do moves and it also moves with close to the desired speed. But only if i feed it inputs. If i stop moving the mouse everything pauses and when I move the mouse again the object continues to move, but without the paused time(meaning it doesn't jump to make up for the lost time).
And that led me to the assumption that I understand nothing about how the program really works. When I create a while(true) and put things in it, how often do these things get called. I always thought they are called as fast as the processor manages to, but it seems I'm wrong.
Is there something more or I just have a nasty bug somewhere and I have to post the code for debugging?