Should I be using Event Ticks and Delta Seconds? And if not what can I use as a substitute?

I guess my question could be are event ticks and delta seconds consistent? As in, on my rig I’m getting 120fps but on someone elses they might be getting 60 fps, will that change the values of the ticks and delta seconds on their end? And if it does, how can I avoid using ticks and delta seconds?

I’ve been making progress on my project and I’ve been ignoring this question for too long. I’d like to make adjustments to it now before more of the project is reliant on Event Tick and Delta Seconds. I have no idea how to get a custom event to do what I want so if someone has any pointers there I’d appreciate it.

Of course, delta time has an impact on anything that is executed on tick. So, you need to add in some math to make the whole thing framerate independent.

Otherwise you can go to class settings and specify at which intervals it should tick (and set it to what you would expect to work with the lowest of your target hardware). You can also just use a delay node with a couple of ms. If delay gets fired when it is counting, it ignores the execution.

One substitute for Tick event is Timer, you create a custom function, add that to timer and set it to loop after a certain amount of time, such as 0.2 seconds or so.

But Tick event and delta seconds would be fine and dandy, if you don’t update everything every frame, one of such thing is UI. Have one blueprint to manage it and control it through called event and function, not by tick. Another noteworthy about UI is that it is always cheaper to create 1 widget then hide/ show it 1000 times than create 1000 widget and thrown them away after each use.

You can also optimized the scene by disable Auto Activate option on costly component, such un-used camera, render to texture,… only active them when in need and after that auto activate.

One final tip is that 1 object manage and update 1000 other object is quicker than 1000 object update by itself.

1 Like

Just because both answers here cover alternatives to Event Tick but don’t mention delta time specifically; if you use an Event Timer as an alternative to Event Tick to keep it framerate independent, you can use the node GetWorldDeltaSeconds instead of the delta seconds from Event Tick and you’ll get the same result.

1 Like