Is it bad to subscribe many interest groups?

Is it bad to subscribe many interest groups or does a bigger byte array (120 subscribed groups) increases the traffic? (I don't ask if that traffic is caused by other players sending things in these groups of course..) And does every player know what other players subscribed? Because each player updates his interest groups in my game at about 30 times per second. I appreciate any help

Comments

  • Hi @lennart862,

    It does not matter how many interest groups you are subscribed to.
    What matters is how much events are sent from client to server and from server to client per group or total.
    You may be subscribed to a single interest group by all clients and exchange tons of messages per second in that same group.
    You may also be subscribed to all groups by one or more clients and exchange few messages per second in each group.


    And does every player know what other players subscribed?
    No you need to handle this yourself using room or actor properties or event special events in default interest group (0) and optionally cached.
  • Thanks for your answer. But my question was rather if its bad to change these subscribed groups 30 times per second. Does the client send for each change a packet to the server which tells him what I've subscribed?

    And if so, is defining target actors in raise event a workaround? Or does everyone receive the message but only the defined actors execute it?
  • Does the client send for each change a packet to the server which tells him what I've subscribed?
    Yes everytime the client sends an operation request or a command (not a packet technically) to the server to inform him of the new groups to be added or removed.

    And if so, is defining target actors in raise event a workaround?

    So you want to send events/RPCs only to few actors and avoid broadcasting.
    If you know the target actors by numbers then you could use TargetActors instead of InterestGroup.

    Or does everyone receive the message but only the defined actors execute it?
    This is already answered here.
  • Thank you so much. You really helped me understand how Photon works.
Sign In or Register to comment.