(Solved) Realtime FPS monitoring?

I’ve been experimenting with some of the layer effects (which are great), and I’d like to put some debug text onscreen to see in realtime how they’re effecting performance, in terms of frame rate (when fps is variable). Is there a straightforward way to do this in GD5?

This is how I do it and it works quite well for me.

3 Likes

Amazing, thank you for the response, that should work nicely!

If anyone else has an alternative method to the one convictedweirdo suggested I’d love to see how others do it as well.

You can calculate 1/TimeDelta()
TimeDelta being the time elapsed between two frames.

2 Likes

Thank you for that tip, Gruk.

Thanks convictedweirdo. Your method works better than 1/TimeDelta().

1 Like

Can you explain why?

I originally came up with that as when using 1/TimeDelta() on my machine it would only return 59.9999 or 30.9999 (or something around that) when displayed as a text object depending on the frame. It made it hard to actually see the value on my projects.

1 Like

They both (in my tests) seem to have similar results, it is just harder to read the 1/TimeDelta() in a text object when the frame rate starts to fluctuate more heavily.

1 Like

Hmmmm…I wonder if this is more due to a lot of monitors not being 60 hz, and are actually 59.97 and 59.9997.

That’d make your game not show 60 as electron forces vsync.