Search Unity

What is the best networking solution for a game like Rust ? (MMO)

Discussion in 'Multiplayer' started by SilentParrotStudio, Mar 26, 2017.

  1. SilentParrotStudio

    SilentParrotStudio

    Joined:
    Aug 13, 2014
    Posts:
    12
    Hello,
    My name is Cristi. I started a new project few days ago, but I really need your help.
    I want to know the best networking solution for a game like Rust that can sustain over 50 players on a single server....without uNet and Photon.

    Thank you!
     
  2. dKav

    dKav

    Joined:
    Dec 15, 2012
    Posts:
    1
    Rust started off using the Lidgren networking framework but eventually ran into issues.

    According to a blogpost 2 years ago (http://playrust.com/devblog-48/) they switched to Raknet.
     
  3. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    you could probably use UNET (minus Unity's garbage relay servers) to get this job done, but you'd need the host to be fairly selective about who it sends RPCs to. I.e. if a player is too far away from a fight for the details of it to matter, the host only sends important messages to that player instead of like every shot fired and every positional update.
     
  4. SilentParrotStudio

    SilentParrotStudio

    Joined:
    Aug 13, 2014
    Posts:
    12
    Few days ago I found MassiveNet.. is that good? If not, I will try to use Raknet and Lidgren and I will see which one is better. Thank you! :)
     
  5. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I see a lot of people making large open world survival games.

    As usual, I refer them to FORGE NETWORKING.

    Why? Because that is what I used to successfully network my huge open world survival game. And although alot of work (adding multiplayer to any game is a lot of work, even with assets like Forge which make it way way easier), it was especially easy compared to that awful UNET; plus full source code, fully authoritative server, standalone or unity, NAT traversal, master server add-on, dirt cheap, & no CCU (no limits on Forge side)

    I have a few links in my sig, about building these types of worlds, if you're interested. Not much there yet, but at least it's a start.
     
    Last edited: Apr 11, 2017
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Well Photon would be my choice in this scenario because it's proven.

    Everything else isn't really, including UNet and random assets on asset store. So you get what you pay for.

    Ideally though I want a networking solution that attempts a direct connection but only uses relay servers when it can't - this is cheaper running costs. Anyone know of an asset that currently does this?
     
    HakJak and CarterG81 like this.
  7. Deleted User

    Deleted User

    Guest

    You can use UNET for 100 players per server using HLAPI and have an authoritative system. Ofc if you pass lightweight commands and rpcs.
     
  8. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    Besides UNET and Photon there really aren't any "proven" network solutions. The closest thing available to the solution built for Rust from Raknet (legacy used uLink which is dead) is Photon Bolt. A few examples of similar games to Rust using Bolt.

    http://survivetheforest.com/

    http://playpantropy.com/



    On top of all the functionality you see in Rust's networking Bolt has authoritative solutions out of the box such as client side prediction and lag compensation. Also in terms of dedicated server it includes an SDK for loadbalancing and matchmaking.
     
    mwrightmgt likes this.
  9. scorp2007

    scorp2007

    Joined:
    Aug 17, 2014
    Posts:
    54
    Has anything changed recently? What is the best solution you can advise for create a game with realtime multiplayer for 200-500 (like Rust) players on 1 server?

    At the moment I'm using the Photon for my games, but it's not suitable for such tasks.

    I read an article by Garry Newman that they use RakNet, but as far as I understand it is not so easy to do it in Unity now?
     
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    RakNet is not supported in Unity. You would want to be looking at photon for this or going custom.
     
  11. scorp2007

    scorp2007

    Joined:
    Aug 17, 2014
    Posts:
    54
    However, rust is done on Unity and they use RakNet - https://garry.tv/2016/02/18/rusts-networking/
    of course I understand that doing the same thing is difficult for me, so I asked here for the solutions.

    The photon is not suitable for a large number of people on 1 server (200-500 people), they answered the forum that their engine is not designed for MMOs.
     
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If you are dead set on copying rust, you will need to roll your own solution, including RakNet because Unity removed RakNet. You will need competent C++ skills.

    RakNet is not designed for MMOs either. It is simply a networking library. You need high competence in this field - and you lack that simply because you had to ask. It's one of those things.

    MMO networking is one of the hardest things to do.
     
  13. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    280
    Last edited: Sep 15, 2018
  14. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    Using RakNet, regardless of the difficulty of integrating it into Unity, would be a waste of time now not only because it's no longer officially supported by Unity but because it was abandoned by its developer. RakNet was made available on Github but it has not received a single update in four years. It's completely dead.

    https://github.com/facebookarchive/RakNet
     
  15. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    567
    Here's an active fork of RakNet. They are restored support for building C# bindings with SWIG, but how well the library is working after all these modifications is a question.
     
    Last edited: Sep 15, 2018
    PutridEx likes this.