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

Setting PhotonView.group increases message rate

$
0
0
Hi,
I am trying to implement mmo sample. My game has players and mobs (scene objects). If I understood correctly, interest groups work like this:
player sets interest groups
then he sets his PhotonView.group to server knows from what group data is sent
then if message is sent from photonView with group that is one of interest groups - server sends message to players that are interested in this group

So on my scene object mobs I set their groups similar to players :

orderIndex = (++orderIndex % cullArea.SUBDIVISION_SECOND_LEVEL_ORDER.Length);
pView.group = activeCells[cullArea.SUBDIVISION_SECOND_LEVEL_ORDER[orderIndex]];

Without mobs settings their PhotonView.group - the send rate is 11 messages/sec. (all are in group 0)
But after I use the code above - rate jumps to like 50 messages/sec.

What am I missing?

Thank you

Viewing all articles
Browse latest Browse all 8947

Trending Articles