Search Unity

Best networking solution for fast paced VR?

Discussion in 'Multiplayer' started by BattlingBacon, May 21, 2019.

  1. BattlingBacon

    BattlingBacon

    Joined:
    Apr 8, 2015
    Posts:
    32
    I'm basically making a VR sword fighting game. I need the hands and heads position to be sent to the other player in the lobby as fast as possible.

    What networking solution would get the positions of the hands and head across the network the fastest? Would peer to peer or client-server do this faster?

    Also, what are the biggest factors affecting the delay between the clients? The packet's overhead?

    Thanks!
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If its 2 player then just connect with peer to peer with the library of your choice, this will be the shortest trip for a packet. Server means that it will take longer for a packet to arrive because you are doing player authoritative if I understand it: the hands positions cannot be decided by a server so you aren't benefiting from having a dedicated server.

    You can't rely on that being 90+ frames per second though and will still require some form of visual massaging.

    You should expect to be updating hand positions and stuff like that in relation to other players at a rate of something between 10 and 30 frames a second, but disguising that latency on the clients with interpolation. It won't actually be as bad as you think it will be (it should look fine).

    Fast is not what you need. Reliable is what you need. Something deterministic is very what you need (like DOTS networking or photon quantum if you have an infinite budget :p)

    The way you worded your post indicated you believe networking to be something you can just make faster, but in reality it is a complete clown festival with packets arriving out of order and delayed and sometimes not at all. So going faster will actually hurt your performance.

    It's all about just having enough information to reconstruct the picture on each client accurately so you should be thinking of networking like forensics...

    At least that's my approach.
     
    Joe-Censored and TwoTen like this.
  3. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    I'd imagine the distance between the clients (in hops) would be the biggest factor affecting latency.