How do I calculate on every frame/tick?

Hello everyone,

I currently have the issue, that the documentation on this page seems outdated, as I was trying to run a code on every frame rendered.

Here is the link to one of the entries on this forum:

It says, that Sleep(0,0) updates on every frame but it seems as this is incorrect and it only updates at a maximum rate of 30 ticks per second.

This is not the only case where the official documentary is not correct as I found no solution to this and had to try many things regarding other stuff.

But maybe I am wrong with this assumption and you have a solution for this?

I am currently trying to read the fps on my own and not with the ingame option in the upper right corner. Does anyone have a solution to this?
If possible I would also like to discuss this with a programmer from UEFN if they are interested or have time regarding my topic. I wrote support but they linked me to this forum but I can´t find a solution for this on here either.

TLDR: Does anyone have a solution on executing code every frame?

Thank you in advance :slight_smile: #

Best regards
Hafmcmcces

That is because verse itself runs at 30 ticks per second

Ok, thanks for that information.

So I see, there is no possible way to ever get a better tick rate with uefn… That is a shame, would be nice to have a higher tick rate.

But thanks for that information, then I don´t have to try and improve here, saved me alot of work :slight_smile:

1 Like

I don’t think you’re understanding how it works, Verse runs on the server, not the client, 30 is a decent tickrate for servers, what are you trying to achieve exactly ?

1 Like

I want to calculate the fps that happened in a specific period of time.
Let´s say, the game runs for 30 seconds and I want to know exactly how many fps I had in the seconds 0-10, 10-20, 20-30.
I tried to add +1 on every tick but as you said, it only runs on 30 ticks per seconds, it is obvious that it isn´t going to work that way.
There is a lot happening in these 30 seconds and trying to get the exact amount of fps via the ingame overview is nearly impossible as it ranges from around 60 to 120 and that very fast.

There’s no way for you to get or calculate the client’s fps unfortunately, closest you can do is use the epic provided performance dashboard it’s not as extensive as custom code obviously but it is what it is. Performance Dashboard in Fortnite Creative | Fortnite Creative Documentation | Epic Developer Community

FPS means Frames Per Second, it means there is rendering happening, your client renders frames but the server doesn’t, you can’t retrieve that, still don’t know why you want to btw

1 Like

Ok, thank you for that information, I will look into that.

Thats true, I didn´t realize that verse runs on the server, I thought it runs on the client.
I want to calculate the FPS because there are events on my map that reoccurs often and I don´t want to have performance issues for users If I overstretch it, when I use specific parts more often.

1 Like