In the bottom left, with debug enabled, I am able to view the FPS of my game.
Is there any simple method to access this FPS value, so I can use it in the game?
It’s a simple question, but I can’t find anything on this topic.
Thanks!
Edit: Thanks for the answers, problem is now solved!
I think doing a Math.pow(tpf,-1); or simmilar should do it. So the time per frame you get in the update loop ^-1.
Should be: fps = 1/tpf;
Edit: but note that for a more stable time you will simply want to count frames and then grab it every so often. For example, once per second just see how many frames have passed.
I should stop overthinking everything.