Search Unity

Does RPC targeting + auto-sync save bandwidth?

Discussion in 'Multiplayer' started by April, May 13, 2010.

  1. April

    April

    Joined:
    Dec 14, 2009
    Posts:
    62
    Hi, I want to send a lot of transform data over the internet. But in this case, I would not use Network.Instantiate. I select the players I would like to instantiate my object on and then manually assign network view IDs for them. Then, the transform data will be sent via auto-sync Reliable Delta Compression Mode. Do I save on bandwidth then, since not all players receive the transform data?

    Say case 1: I have 50 players connected to the same server. The server instantiates an object and gives it a network view ID. It then tells two players to instantiate a similar object and give it the same network view ID. The transform data is then auto-synchronized.

    case 2: I have 50 players connected to the same server. The server calls on Network.Instantiate so the object is instantiated on everybody. The transform data is then auto-synchronized.

    Do I save on bandwidth if I proceed with case 1? Is it safe to say that the server sends data only to the two players? Or do I not save on bandwidth because the server sends data to all players but only two players receive them?

    I know the question sounds stupid but I want to make sure.

    Thanks.

    April
     
  2. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    If you send an RPC call to two targetted NetworkPlayers, I believe we can rely on Unity networking to really only send traffic to those two players.
     
  3. April

    April

    Joined:
    Dec 14, 2009
    Posts:
    62
    Thanks a lot, Leepo!. :D