I’ve started to work on the multiplayer part of my game and the current state of multiplayer in Unity can be a bit overwhelming so I thought I’ll share what I found and what I decided to go with (I also decided to implement that live on twitch.tv so check out my brand new channel over there).

In the last blog post I talked about how the input system in unity is currently in transition from the legacy system to a new system which isn’t quite ready yet.

As it happens, pretty much the exact same thing is true for networking too!

The current system is referred to as UNet (Unity Networking) and consists more or less of two parts:

HLAPI/LLAPI (High-Level and Low-Level API): That is what you use to write your code and create your game.

Multiplayer Services: Those are servers run by Unity to support things such as matchmaking and relay servers.

UNet has a few limitations, the HLAPI is generally not liked that much because it’s fairly unreliable and the multiplayer services only allow for clients to host the game directly.

If you want to use an authoritative server you can do that but have to build the infrastructure yourself (such as matchmaking and hosting).

Therefore Unity announced that it’s gonna deprecate UNet as a whole and create a completely new set of networking tools.

But of course none of that exists yet and it will probably take a while until any of that is ready to use.

Not to worry, UNet will still be supported at least another 2–3 years tho.

Nonetheless, UNet was for many already not the first choice before and if you are starting on a game just now you might be put off by the coming deprecation, so here are some of the alternatives worth considering.

The first one on that list probably has to be Photon, they have two products that are good choices to develop Multiplayer games in Unity: PUN and Bolt.

PUN being an alternative to UNet, meaning the player acts as host and the traffic is proxied through Photon’s server which provides matchmaking, relay and those kind of things, whereas Bolt is more an alternative for Unity’s new system in that you have an authoritative server that you host yourself.

The big downside of course being vendor lock-in, that may or may not matter to you but you have to stay with Photon, pay for their licensing and hope they keep being an awesome company.

On top of that you are locked into the architecture you choose at the beginning.

With UNet you can have a player host a game locally or connect to a remote server just the same which gives you a bit more flexibility as you evolve your game.

On the other side of the spectrum you can of course just write your own solution from scratch. Some people that did that offer their solutions also on the Assetstore such as DarkRift but I haven’t looked too much into them.

And then as a middle ground there are open source solutions that build on top of the LLAPI of unity, namely MLAPI (as in Mid-Level API, implying it sits kinda between Unity’s LL and HL-API) and Mirror (aiming to mirror the HLAPI of Unity but fixing the issues that has).

Both are open source and under the MIT license which makes them quite flexible but of course they are missing the infrastructure such as matchmaking.

As always there are pros and cons for everything and it depends a bit on what you are trying to build, but for myself I decided to give Mirror a try as that seems to be a solid solution that provides everything I want.

Before I implement that in RCRacerVR which is fairly complex I’m gonna give it a try with my old game ChessVR which is a fair bit simpler (being turn-based and all) to evaluate that and then see if that’s the right solution for RCRacerVR as well.

I also decided to do so live on stream so head over to twitch if you are interested in more.