I have a multiplayer game that can be saved and reloaded. When the game is reloaded by the server (from a previously saved game), the server needs to pass the loaded game data to the clients so they can set up their world accordingly. To do this I have just been using a replicated variable, which is a struct that contains all the data from the saved game. The server loads the game, sets this variable and it auto replicates to the clients. The clients can then get to setting up their world.
This has worked great in testing. However I recently started setting up full size game levels (as opposed to my small test levels). As the size of the level increases so does the amount of data being saved and loaded. This has now obviously reached a level where it must be breaking the UE4 replication system. By breaking, I mean that the client just hangs and sits their indefinitely waiting for data the seemingly never arrives. If I make the level a little smaller, then it works fine. There seems to be some hard limit that I must be hitting. I ran the network profiler that comes with UE4 to have a look at what is going on. Now I don’t fully understand the profiler’s readings, but one thing that stood out to me was a spike in the transfer when the server starts the game and sets the replicated variable with the loaded game data. This spike seems to hit about 59Kb in size, which seems pretty small, but is obviously too big for a replicated variable to handle.
So I need to find a different solution. How can I transfer large amounts of data from the server to the client without it breaking?
Are RPC’s better for this sort of stuff or is there some other method?
Should I be trying to break the data up a bit across multiple replicated variables or multiple RPC calls with a chunk of data at a time or something?