Actor Component replication vs Indivisual actor replication
I want to know which type of replication is more efficient.
Replicating a variable present inside and actor or replicating a variable present inside an actor component.
According to the component replication page
I will make my some of my systems as actors instead of actor components depending upon this. So it will be helpful is some one can point it out.
asked Mar 14 '15 at 04:38 AM in C++ Programming
On the actor is more efficient. That bit about the overhead says it all.
If you have a 4 byte variable on your actor, it only costs the 4 bytes. If, however, you also replicate a component and have the variable on that instead, it costs the replication of the component (a few bytes) + the variable (4 bytes in this example). Having it on the actor will always be more efficient, but why then would they have component replication? I'd assume it's design efficiency. If a component has replicated features that are as complex as an actor, then the additional overhead of replicating the component is basically negligible when you think about the big picture of designing your actor and their components.
So to summarize. If the component is only going to replicate a few variables, and you're only going to have 1 instance of that component on the actor, then it's easy enough to have the actor handle that replication. However, if the component has more than a few variables and/or you are using more than 1 instance of that component on a single actor, then for the sake of building a game and not losing your mind, replicate the component.
Really this is up to your discretion.
answered Mar 15 '15 at 02:02 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here