Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Networking Is it possible to write NetworkClient/NetworkServer compatible code using NetworkTransport?

Discussion in '5.1 Beta' started by cannon, Apr 21, 2015.

  1. cannon

    cannon

    Joined:
    Jun 5, 2009
    Posts:
    751
    I tried it mostly because I saw the Network.AddWebsocketHost. Using NetworkTransport.AddHost and connecting using NetworkClient didn't work with the default settings.

    Disregarding websocket support, which I understand is not yet supported, can I write HL-compatible code using just the low-level API?

    Just curious what's possible with the new network APIs.
     
  2. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    HLAPI uses specific marshalling algorithms. For sure HL-code itself uses LLAPI internally, but there are a lot of c# specific sugar inside which (I guess) will be difficult to reproduce
     
  3. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    So that means we need to wait for the specific client/dedicated server classes - which will be available any time soon? * said hopefully *
     
  4. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    Goood question. It will depends of user feedback.
    For example: HLAPI is great but I cannot use it because (and because here is very important for us).... So far we cannot imagine what else we need to implement and what is priority of this :)
     
  5. cannon

    cannon

    Joined:
    Jun 5, 2009
    Posts:
    751
    Thanks, I was just toying with the idea of custom transports, e.g. so we could swap webrtc for websockets, and still keep the high-level interface the same.
     
  6. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    "HLAPI is great, but I cannot use it because..."

    It does not fit with a MMO. I don't need network-synced transforms, or lobbies, or the ability to swap which client is currently the server; but I do need fast command transport, with functionality to help with lost packets, jitter, burst, and other great latency effects, along with authoritative movement with the server having a colliders only version of the same map used in the client, and fast AOA/AOI/Range functions for sending packets to subsets of connected players.
     
  7. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    Step by step:
    For Cannon:
    (1) Websockets are supported on low level. I did couple successful tests using hlapi but it is still unstable. In ideal situation user won't see any difference by switching transport...
    (2) For webrtc itself we doesn't support this. (so far, and actually we haven't decided yet are we going to support it, probably by request)

    For Whippets:
    Yes we are working on this
     
    Whippets likes this.
  8. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Brilliant news, I can't wait for that XD