Why are my event ticks slowing down?

If i need to post a simple video I can but it may be a simple answer.
I feel like my event ticks are slowing down and it may be based on performance…But my PC is decent…so…anyways

I noticed one easily. i have an event tick that checks for my gun over heat to be at 0 and if it is event tick adding to that amount a certain amount untill its full. basically a progress bar that operates based on Gun power, Similar to stamina. If the gun over heats, regeneration kicks in.
It usually takes about 3 seconds to fill normally.

I have a world and all it consists of a is a HUGE World machine map. Just the height map with a complex material. And then an enemy, and my self. FPS style…
As er battle, he shoots fireballs, particles …of course I am too but…point is once things get heated it takes sometimes up to 5 seconds to refill my progress bar that’s being operate by this tick.
Its almost not hurting my fps at ll…

my question is, Is that the reason?? Performance?? As the computer slows FPS the event tick per frame does as well?? And does that not cause serious issues…or is that something that doesn’t appear in the package??

Just some info on this problem so I can understand how it works. thank you,.

As you properly realized event Tick will be called once per frame and will therefore be called differently often when you have different kinds of fps. What you overlook is the “Delta Seconds” this provides as well.

Delta Seconds provides you the time since the last frame was rendered in seconds. This means in general for things like this you will specify how much should be generated per second and then multiply that with delta seconds instead of using full values.

That way you are fully independent from fps… well not fully. In multiplayer someone with more fps will always have an advantage if the ping is exactly the same since his events are called and sent more often. But for your gameplay it will decouple it from your fps.

I hope this helps.

Cheers! :slight_smile:

Oooohhh very nice!!! Ok I see that…I never really thought to do that!!
So how would one set these delta seconds to operate this way INSTEAD of the way I’m doing it??

I have a little network that happens on event tick. So I drag a wire from delta seconds and…how do it use it to my advantage?

Do I set a delay and set the delta seconds to it??? I don’t think that’s right…I’m just trying to figure what I need to do EXACTLY what I’m doing and just add this functionality In.

I’m not entirely sure how you set up your script. Usually you either use a delay which is separate from event tick anyway or a counter which is reduced / increased. If you use a counter you have to multiply your change per second with delta time and add / subtract that from your counter.

If you use a different method I will need to know more about it :wink:

I’m gonna look into this and run a couple tests. Either way this was knowledge I surely needed. :slight_smile: thanks!