Tpf - when to use it?

I’ve been seeing some posts talking about tpf lately, but after re-reading the tutorial, I can’t understand when to use it. Let’s say that I have a shooting game which remains at 60fps (settings.setFramerate(60). When the player shoots, the bullet moves, and continues moving with 1 unit every second.



Why would I want/need to use tpf in this scenario? I know that tpf is needed to ensure ‘smooth movement’ or rotation etc… but if the tpf is capped, shouldn’t that work the same?



Thanks a lot!

In case someone else’s machine is a little slower and they only get 58 FPS.

and in my case, when i record the screen it drops to 38 with vSync, always use tpf!

1 Like

So I should use tpf even when I am capping the Framerate?

@memonick said:
So I should use tpf even when I am capping the Framerate?

yes
1 Like

Thanks a lot guys!

Capping only means that you can’t go higher, not lower. So all the lower end stuff might go lower and without tpf, things will get screwy sometimes. You don’t want that.