Is this a costly/laggy approach for my game?

Hey everyone, I’ve got a question for you. I’m a beginner to unreal engine 4 and game development in general, but I’m getting the hang of it I think. I’m sticking to blueprint scripting for now since I understand it easily , especially compared to C++ with still daunts me . However I have a question, is this a bad thing to do? I’ve got a “main” sort of frame-frame loop going on to render all the main calculations for your character that can’t be fired with events. For instance, I do some ray casting for fall checks and other updates such as health and stuff. I was just wondering if there is another way to do this or if I’m fine. Screenshot - c68587233408c759548b798c8af77a70 - Gyazo . In my mind it’d be like a “draw” loop in processing/java.

I’m no expert but i wouldn’t use the tick event to constantly check or update things like falling, health and other stuff if they can be replaced by events. For example in the case of falling there are events for collision that fire up when an has collided with another , you could use this to check if the player has collided with the ground ( ie, the player has fallen). For health for example there’s an event to damage an actor, so you could call that event to damage the player if it has stepped on fire or has been hit, and then create a custom event to update the HUD. see that for those two concrete examples the tick event can be avoided and it’ll be a performance boost.

Well what you described would be an event for landing, not falling.

I’m still unsure as to how events and tick checks differ a whole lot, because there has to be some background loop for an event to fire yes? If someone could clarify on this I’d appreciate it

Hi

There are things you need to run of tick.

What you need to do is work out when and where to use them.

First up, start playing with what you have, get things going.

Run and use the FPS built in to check if it is lagging.

Run checks on you spawns/cast to make sure the fire right.

There is no simple answer.

Is it better to do those heavy tick calculations that can’t be done with events via C++?