Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Exceeding bandwidth limits by a lot.

$
0
0
I am working in a game where physics is crucial, players are active ragdolls, so each player has 15 rigidbodies to sync over the network, put 10 players on a server and it will add up exponentially.

Each rigidbody, if sent fully would be 3 Vector3, 1 Quaternion, total: 16 * 3 + 20 = 68 bytes.
So each player would send 1024 Bytes (68 Bytes * 15 rigidbodies) per message.
Put that 10 times a second and you have 10KB/s per player of send data.
In a 10 player match that would cost the server about 1MB/s since it needs to send 100KB/s (10 players * 10KB/s to other 10 players) because every player needs to know about eachother.

I managed to get that down to 3KB/s per player with some compression and other ideas, probably could get to 2.5KB/s if SerializationRate is 8 and deactivated some rigidbodies in cost of a little worse simulation.

Let's stick to 3KB/s example and 20CCU/60GB plan:
Server is now sending 30KB/s to each player, so 300KB/s of traffic for a 10 player match.

Then I figured out if I am running 10 player matches all day, that would cost me 25GB per day which is definitely gonna pass the plan's limit by hundreds of GB.

From my math 60GB/month equals 23KB/s.

I am interested in knowing how the Exit Games team estabilished the 3GB per CCU estimation, is that based on average play time per month?

Am I doing some wrong math here?

Viewing all articles
Browse latest Browse all 8947


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>