heres a link to a timing example in the code archives:
game timing
The idea behind this code is: Your program measures the gap in Milliseconds between two consecutive time readings. On fast computers this will be a smaller gap, a bigger gap on slow computers. Then the movement of a sprite is calculated by multiplying by that *gap* mentioned above. As a fast machine updates the screen more often, and a slow machine updates a bigger *gap* - the sprite movement is the same on both machines.
hope my explanation makes sense...
game timing
The idea behind this code is: Your program measures the gap in Milliseconds between two consecutive time readings. On fast computers this will be a smaller gap, a bigger gap on slow computers. Then the movement of a sprite is calculated by multiplying by that *gap* mentioned above. As a fast machine updates the screen more often, and a slow machine updates a bigger *gap* - the sprite movement is the same on both machines.
hope my explanation makes sense...