Multiplayer: Large-scale physics Synchronisation

Hello,

we have recently tried to implement multiplayer for our game.
We’re using Unity.Entities and Unity.Physics for large-scale battles of 10000+ PhysicsBodies.

After reading a bit through the Internet we figured out how to create a connection using Unity.NetCode and how to instantiate the Entities as NetworkGhosts, unfortunately it does not scale well.
At about 2000 units we are experiencing asynchronous behaviour and the movement sometimes turns into teleportation.
At about 10000 units most of the units are just sliding along somewhere and collisions feel very unresponsive.

We tried prediction and interpolation with both static and dynamic optimisation and had the best results with dynamic interpolation.

Looking at the NetDbg stats we are experiencing very old snapshot ages of 300+, so maybe that’s the problem.

Question 1: Is it realistic to expect a large-scale physics battle to “just work” in multiplayer, or is this idea unreasonable?

Question 2: Why is the snapshot age this high? Is it due to the limited bandwidth of the server and packages fill up too quickly to support this many units?

Thanks in advance for advice, feedback or help!

10000 objects is a lot assuming they are actually changing every frame. I would not expect that tot “just work”, you need to optimize and make trade offs to get close to that many entities ghosting correctly.

Server snapshots will only fit a very small subset of the entities in each snapshot, an age of 300 would mean each entity is sent every 5 seconds, and it would mean you fit around 30 entities per packet assuming 10k entities and 60Hz sim/send rate.

Prediction of physics objects is not supported in netcode 0.6 so they need to be interpolated.

Some of the things I would look at to increase the number of entities which can be smoothly updated (in the order I would try them) are:

Thank you very much for the info.
We will look into it some more and try the things you recommended!