I see a bunch of developers use the .RenderStepped
event to run a block of code every frame. Though if RenderStepped runs it every render frame and .HeartBeat
runs it every game frame, wouldn't there be no need for RenderStepped? If my understanding of the two terms is correct, running a loop with renderstepped would run code multiple times per HeartBeat, which is inefficient, since the user only sees the visible effects every HeartBeat.
The only practical usage I could see is eithier with managing physics or working with networking between client and server.
Because, as the names imply, RenderStepped is related to rendering and Heartbeat is not.
So RenderStepped is the best option for render stuff, and if you are only concerned with doing stuff "every frame", RenderStepped in the worst option because rendering will yield unnecessarily. Nothing waits for Heartbeat.
Heartbeat should be used for everything unrelated to rendering.