Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Third Party Looking for a High level networking API (Mirror, Colyseus, ..)

Discussion in 'Multiplayer' started by jeanrouq, Mar 29, 2020.

  1. jeanrouq

    jeanrouq

    Joined:
    Jun 20, 2018
    Posts:
    7
    Hello,

    we are actually looking for a unet replacement (dedicated game server model using HLAPI).

    Here is the long list of requirements we have today:
    • Secured Transport : websocket secure or Tls.
    • Multiplatform Client : windows, windows UWP, android, iOS and webGL.
    • Easy to use API : Manages reconnections automatically.
    • One Dedicated Game Server can handle connections from all clients platform (WSS and TLS).
    • Deployment : The solution should be deployable on premise, or deployed on cloud without dependency to a third party service.
    • Data transfert API allows to share small byte arrays of data like JSon messages, coordinates, ...
    • Data transfert API allows to share large byte arrays of data like hd jpg images, in a relatively fast and efficient way.
    • Scalability : It should scale easily (compatible with agones or provide a scalability model).
    • Robustness : ideally the solution is already deployed in production.
    • Latency : this is not a very strong requirement, so tls or wss is ok, nodejs as a server also.
    • License : Ideally license cost free, however paid solutions can be also studied.
    • Number of users : around 1000 users dispatched in several rooms (2 to 16 users per room).
    Here are the potential candidates found so far:
    1) Mirror : Seems to fill all the requirement, except :
    - Secured connections : TLS is not supported. One question here : Is it possible to use WSS for non-webgl platforms? Does the Ninja.Websockets support IL2CPP, and is it ready for production?

    2) Colyseus (https://github.com/colyseus/colyseus). Seems to fill all the requirements, except one information I could not find : is it possible to share large byte arrays of data? Should the messages be splitted ? (like in unet)

    Any other ideas?

    Thanks for sharing your comments!
     
  2. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    I am bit confused because you're asking for two things. On one side a replacement for Unet's HLAPI and on the other a scalable client-server technology.
    Also you're providing as example a solution (colyseus) that doesn't look like an HLAPI replacement.

    If you want an HLAPI replacement you will have to develop and deploy the server as a headless Unity executable running on the server side, but you can't expect to be running "One Dedicated Game Server", especially with a high traffic.

    On the other hand with a platform-agnostic server solution (i.e. not as tightly integrated with Unity as HLAPI) you will likely be able to run a single server but you'll loose some of the perks of working with the Unity engine on both sides.
    Choosing which type of solution you need mostly depends on what your game does, which is not clear.
     
  3. jeanrouq

    jeanrouq

    Joined:
    Jun 20, 2018
    Posts:
    7
    I see scalability more like a feature of Unet. A linux binary can be deployed in kubernetes container for instance.
    Anyway if this is confusing, the goal of this post is to find a suitable technology in order to replace Unet, wich is deprecated.

    Of couse the less to modify the better, so Mirror comes as an ideal replacement. However, I still have the following question about websockets secure transport : Is it possible to use WSS for non-webgl platforms? Does the Ninja.Websockets support IL2CPP (on windows, uwp, android, and ios platform), and is it ready for production?

    If mirror is not suitable, we will have to rewrite the server, and one part of the client. For this part, on potential match would be Colyseus.
     
  4. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,331
    You can fork Telepathy and use SSLStream which is built into C#.
    Mirror can work with a lot of different transports, so that part isn't a showstopper.
    Either wait until someone makes a SSL transport, or make your own if you don't want to wait :)
     
  5. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    Ok... depending on what you need to do it could work, though it makes thing quite more complicated, imho. Also isn't it in contradiction with this other point in your requirements?
     
  6. cj-currie

    cj-currie

    Joined:
    Nov 27, 2008
    Posts:
    301
    I recently discovered Agones, which is a sharding application for scaling Linux VM's on Google Cloud Platform (or other Kubernetes cluster). It appears to run Unity on both ends.