Multiplayer questions

Hi.
I have some doubts about the model I should implement within my game.
It’s a turn based combat game for two players online. But once two players are paired, we need to transfer information (3 MB approx.) between them before the combat can begin.

I have seen the ShooterGame demo, but before starting working on it, it would be great to get some hints regarding the best approach to the issue.

Thanks a lot.

Hi Angel,

There are a couple ways you can transfer large chucks of data using the built-in replication system, though we realize that the support could be better.

If you data is just a blob of bytes, the simplest way is probably to use reliable RPCs with a TArray parameter. If the array is large though, the network packet will be split up based on the configured MTU size, and dropped packets can cause the entire array to be re-sent. You could probably alleviate this issue by splitting up your data across multiple RPCs.

If the data only has to be transferred from the server to the client, you can also use a replicated TArray property on a replicated actor, and fill in the array’s data on the server. The client will receive the data through the normal replication system, but again, for large arrays dropped packets may cause a lot of re-transmission.