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

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!

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.

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.

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! :slight_smile:

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.

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?

2 Likes

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

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/

https://www.youtube.com/watch?v=jPf8ABAQWJk

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.

1 Like

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?

RakNet is not supported in Unity. You would want to be looking at photon for this or going custom.

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.

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.

3 Likes

SmartFoxServer has dedicated MMO API which might be of interest. Maybe you can take a look.
Here some doc on the subject: SmartFoxServer 2X documentation: mmo-rooms
It requires some understanding of the SmartFoxServer basics, but you should get the idea.

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

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.

1 Like