How do Photon Server handles unreliable packets?
Options
zhuchun
✭
Hi, I'm implementing delta compression for my game, I want to know more about how do Photon Server handles the unreliable custom event.
1. Will Photon combine a few events sent to the same actor to optimize the traffic? Should I combine the world state as big as possible and let Photon slice it?
2. Should I care about incomplete message/packet? For example, if Client1 received State2 and State3 but State4 was lost, is Photon going to drop them all or leave it as is?
1. Will Photon combine a few events sent to the same actor to optimize the traffic? Should I combine the world state as big as possible and let Photon slice it?
2. Should I care about incomplete message/packet? For example, if Client1 received State2 and State3 but State4 was lost, is Photon going to drop them all or leave it as is?
0
Comments
-
HI, @zhuchun
Photon does not know anything about any logic built on top of it. Nothing about actors, worlds, states and stuff like that.
So, photon may join some operations to send them in one packet, but they are joined as some abstract data would be joined. But there is something you should know
if your unreliable operation is bigger then MTU which is 1200 bytes by default together with headers. Then it will be split into fragments. Fragments are delivered reliably. So, this may hit your performance.
so, yes, you should care about unreliable message size it should be around 1000 bytes. Also, do not send too big reliable messages. they also will be split into fragments and it may take too long to deliver all these fragments.
best
ilya2