Regarding FPS and Gamespeed

I'm pretty new to game development and especially 3D development.



What i was wondering was:

If lets say i make an test application that runs in 30 fps on my old laptop.

In this application I am able to move an object back and forth in the universe by pressing the back and forth arrow. or (W, S)

Now for the issue.

If i hold the forward - key down and for each time the update cycle of the engine is passed while the key is pressed the object will continue to move forth with a specific amount of pixels or (units) for each update.

Now if i run this application on my work station which runs this application in110 fps.

And i preform the same action. i press and hold the forth key.

Then the object will move "Faster" forth in the universe as the update cycle is passed more then double the amount of times it has been passed on my laptop.



I am pretty sure you guys have a smart answer to this issue :slight_smile: and a way to make the speed of the objects consistent regardless of the fps :slight_smile:



Thnx

multiply the movement by timer.getTimerPerFrame(also stored in tpf if you extend basesimplegame)…

Cool thnx. I'll look into this when I'm home from work.