Search Unity

Network Groups

Discussion in 'Multiplayer' started by DRRosen3, Mar 26, 2015.

  1. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    683
    I'm just trying to make sure I understand when, why, and how to use groups when sending messages (packets or what-have-you) across the network. The example that comes to mind for me is this:

    So I'm imagining this map divided into four quadrants. Let's say each quadrant has NPCs and players.
    • The orange star represents Network Group 1.
    • The red star represents Network Group 2.
    • The blue star represents Network Group 3.
    • The green star represents Network Group 4.
    So let's say all players start out in the blue star quadrant of the map, they'd be in group 3. Which means that all RPCs sent with "3" as the group argument would be received and processed on all players in that quadrant client's (right?). And any RPCs sent from/to the other groups would be ignored by their client's (right)?

    So if an NPC moves to a new position in the green star quadrant, it wouldn't be processed on Groups 1-3 (right)?

    Now, if a player moves from the blue star quadrant, into the green star quadrant, his Network Group should be switched (via a trigger collider) from 3 to 4 (right)?

    Again, I'm just trying to check my understanding of how groups work when it comes to Networking. There's not much out their in the form of tutorials and what not. At least not that I've found.