Improbable Icon

Component events suggestion

unreal

#1

Hi!
I would like to make a suggestion for future revision.
Wouldn’t it be great to have an event just a tick before a component gets updated? For example, with the new system can update a component “up to X times per second”, it would be awesome to follow some kind of flow like:
Event ComponentUpdatingNextTick -> Do the actual Update -> OnComponentUpdate, this way, we could update some values right before it updates, not the way it has to be done right now which is updating it constantly on every tick or every X seconds, making some of those update lost as there would be a local update before the actual network update, thus “wasting” computing resources.

I think it would be an optimal workflow for some updates. This way you would complete the feel of “automatic updates”.

What are your thoughs on this?


#2

I could just be misunderstanding you, but it sounds like this componentupdatingnexttick event would need to know something was going to happen before it happened. Since that is technically impossible, I have to assume that this would be holding an update from spatialos back for an entire tick. I would much rather have an event trigger every time we get an update from the server (an event independent of tick, at least for the one receiving the updates). Then I can design logic around how I want to handle an update if I don’t just want it to immediately change the value. I think are more instances where I would want normal update logic than this kind that I would prefer any advantage in speed I can maintain.

I also think that a lot of the values I would want custom update logic around are going to be go away when the GDKs come out, and we are allowed to use Unreal’s netcode on top of SpatialOS. Replicating smooth movement is the biggest problem I have run into with custom updates so far, and having Unreal handle that again would eliminate a lot of those issues for me.