I am looking talented person to create / guide me to create system that can replicate large arrays. I already posted this question to C++ section, but because this isn’t ordinary stuff, I’m afraid that there isn’t any help. So let’s make a Job Offering from the problem.
Below is my original message:
Hello!
I have been fighting with this one a long time. Basically, I have a tool that allows players to draw into air by creating an Actor that has Instanced Static mesh component. When player is holding the trigger, new instances are added. This works great in single player game, but problems arise when I need to have this working in multiplayer.
There are approx, 100-1000 mesh instances in one drawing. If I replicate array normally, the clients will start lagging so much that playing is impossible until replication is finished. What I tried to do is putting all new instances to array and after 1 second, move all stuff from array to replicated array that is send to client, so the payload is much smaller for server, but I am having problems implementing that. Also, that system might have problems because game is Drop in / Drop out. So eventually, the replicated array has lot of stuff and newly joined players would try to replicate the whole array and we are back in square 1.
In Attachement is the code from the crucial parts.I explain them here:
Function BeginPlay:
We set the timer on. Timer runs functions SendJointBulkToReplicate and SendStrokeBulkToReplicate
Function Update:
Runs every tick. In this function, We are adding all the new strokes to NON-replicated array. If we are server, then we just draw them to world.
Function SendStrokeBulkToReplicate
We add all the stuff to replicated arrays and then clear the array so we can have new stuff in there.
Functions** OnRep_AddStroke** and OnRep_AddJoint
These are run after the** ReplicatedStrokeTransforms and ReplicatedJointTransforms **are updated. What I try to do there is to add instances that are yet to be added.
If I play this as a client, I can paint normally maybe 1-2 seconds and after that I get more and more lag. The more I draw, the more lag I starting to get. I thought that Array replication in Unreal is clever enough to replicate only new changes to array, not the whole array?
So I am looking a person who can do this replication system with me and guide me along the way. I am willing to pay 200 dollars or more (If guidance is good and thorough). Unreal Replication system itself is pretty familiar with me and I am having no problems understanding the basic workflow, so you don’t have to start with very basics.
Thank you very much!