Dear Friendst at Epic,
I am loving UE4, thanks so much!
My first question:
Let’s say I have a reaally big replication list including static arrays and ustructs as well as simple data types (below code is just a theoretical example)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Replication List
int32* AVictoryPower::GetReplicationList(uint8* Recent, FPropertyRetirement* Retire, int32* Ptr, UPackageMap* Map, UActorChannel* Channel, FReplicationFlags RepFlags)
{
Ptr = Super::GetReplicationList(Recent, Retire, Ptr, Map, Channel, RepFlags);
//~~~~~~~~~~~~~~~~~~~~~ Landscapes ~~~~~~~~~~~~~~~~~~~~~~
//Triggers Rep
//this is a single boolean value
DOREP(AVictoryPower, LandscapeVisibility_DoRepEverything);
//~~~ Static Arrays ~~~
DOREPARRAY(AVictoryPower, LandscapeHidden);
DOREPARRAY(AVictoryPower, MoreData);
DOREPARRAY(AVictoryPower, MoreData2);
//~~~ UStructs ~~~
DOREPSTRUCT(AVictoryPower, LandscapeHidden2);
DOREPSTRUCT(AVictoryPower, Morestructs1);
DOREPSTRUCT(AVictoryPower, Morestructs2);
DOREPSTRUCT(AVictoryPower, Morestructs3);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return Ptr;
}
Is it true
that if I manage to dirty the single value of LandscapeVisibility_DoRepEverything, which is a boolean, by writing
LandscapeVisibility_DoRepEverything = !LandscapeVisibility_DoRepEverything;
that everything else in the entire replication list will always be replicated?
My Conclusion if The Above Is True
If it is true that the dirtying of a single value causes whole replication list to be sent across network
then
I assume it is to my advantage to separate out the replication list into different replicating actors
so that there is a minimal chance of an excess of data being sent across the network just because 1 value got dirtied.
Balance
Obviously there’d have to be a balance between the number of actors used to separate out a big replication list as there is a limit to how many actor can be replicated simultaneously
Actor Replication Limit
Speaking of which
what is the Actor channel / simultaneous Actor replication limit in UE4?
Replication Lists of Extended Classes
Let’s say I have class like this Character->MyCharacterBase->MyCharacterFinal
each of these classes has a replication list
In relation to all my above questions, you can see why I’d like to know if each replication list gets treated separately!
specifically I am asking
If the replication list of MyCharacterFinal gets triggered by a dirty boolean value
does it also trigger MyCharacterBase and Character’s replication lists?
I see the super:: call, but I am hoping for some sort of magic regarding the replication of alllll data if a single value gets altered
My Point!
If the replication lists of each superclass are OR CAN BE triggered individually, then I can avoid the actor channel limit and the excessive replication for a single value by separating my actor out into subclasses with individual replication lists depending on the purpose that actor is playing with the particular data is replicating.
Why I am so focused on all this
I need to replicate a looot of info for my game, since it has a built in multiplayer level editor where multiple people can edit the world at the same time.
Tutorial Coming
I will be writing up a tutorial on all this info once you help me get it all sorted out
Thanks!
Rama