[EDIT 04/04/23] WARNING: This list hasn’t been updated in a few years so a lot of information is missing and outdated.
This is a simple list of the best solutions and assets and their pros and cons so that I (and others) can make the best choice for their multiplayer projects.
Here’s a link to a similar google doc where you can get more information on some of the solutions listed here, and general networking terms:
TCP and UDP support; can be swapped out. Other supported transports are Epic Online Services, Steam, and more.
Good documentation, consistently named and commented API.
Regularly updated, fast bug fixes.
Long-term support and scheduled/limited API changes.
Released games on product proven to scale to hundreds of CCU.
Advanced Area of Interest system with condition stacking, and Network Level of Detail.
Client-side prediction.
Lag compensation.
Scene manager for scene instances, global scenes, connection scenes, match scenes and more.
Network object pooling.
Most features of any free solution.
Encryption layer.
Addressables support for Scenes and Prefabs.
Allows for custom sync types, serializers, AOI conditions and more. Cons:
Unity dependent.
Match making requires a third party service. Model:
Client/server, or peer to peer with third party transports such as Steam.
Photon PUN2 Pros - matured with plenty of examples and tutorials
free 100 CCU making it easy to test your game Cons - Difficult to implement cheat prevention Model - Client to client via cloud server
Mirror Pros - UNET + 940 bug fixes and improvements. Cons - No Lobby and only one client per Connection. which were native UNET HLAPI features that have been stripped out. Model - Client/Server
Netcode for GameObjects Pros - Supported by Unity
Integrates well with Unity Multiplayer services
Official project samples provided
Good tutorials out already (see codemonkey multiplayer) Cons - made for small scale co-op games. No client side prediction
Parenting network objects to child gameobjects is painful Model - Client/Server
very mature (available since 2004) with a lot of examples of increasing difficulty
exhaustive documentation
integrated HTTP tunneling
protocol cryptography
specific MMO-oriented API
extended lobby features: rooms, buddies, messaging, match making, etc
database integration
free 100 CCU edition
both perpetual and elastic licenses
fast update cycle in case of bugs Cons (?):
different approach with respect to other solutions listed above Model:
client/server
MLAPI Pros - similar structure to UNET but with many more features and greater stability. Cons - No Custom Messages or SyncedEvent Model - Client/Server
Unique “make multiplayer and receive save load for free and without efforts” feature
Battle tested on games Windward and Sightseer (created by developer of these games)
Almost out of box support for huge multiplayer open worlds (more than 100x100 km)
Cons:
Out of box does not supports parenting of one networked object into another (but with commenting a few line of code it became possible)
Some kind limited \ inconvenient for games which have many hand-made levels (scenes) with manual level design (but very powerful for open world procedural games)
Not free (95$) and demo \ free version is not available
Photon PUN actually built on a custom enet for reliable UDP (allowing TCP and other options transparently, which enables support for more platforms) and it’s best described as “client to client via server”. The connections are not direct (so no NAT and no problems when the “host” drops out of a match) but the server is agnostic to the specific game’s logic. It’s also not just a relay, as it can buffer messages and store custom properties.
MLAPI, similar structure to UNET but with many more features and greater stability. Written from scratch. Here is a comparison: https://midlevel.github.io/MLAPI/features/
Mirror is getting a lot of traction as it builds on the culture and community centered around UNET. It is under constant development and the authors are accessible via discord.
Whichever solution you go for, as you know, it has to be understood inside and out. I’d advise placing the level of available support and existing examples at the top of your criteria.
Edit: UNET / mirror is not peer to peer. You have the flexibility to integrate with a myriad of hosting services like Amazon Game lift, AWS cloud compute, Digital Ocean etc…
My UNET development servers authenticate via Steam and run dedicated instances on Amazon Web services. I have the flexibility to move it to just about any other hosting provision I like without being locked into a particular SDK.
@TwoTen Does MLAPI have any demo projects? Does it support a hybrid TCP/UDP system where we can use TCP for things like chat/inventory/file transfer etc… and UDP for player movement/actions etc…?
Included writer and reader objects for managing data in packets
Auto packet fragmentation
Reliable, unorder, fragmented and non-fragmented flags
Do it yourself
Cons
Do it yourself
Expects you to know how networking works
Have to setup an ownership handshake procedure yourself
Connection IDs are longs and arent garuanteed to be unique (0.8 rectified this)
Model: Client-Server
The fact that this networking middleware is external and doesnt rely on Unity means that I dont need to worry if its deprecate or experimental (like the current twilight zone of the networking APIs in Unity). It also helps that I’m able to use this API in an external application in order to host my networking process when using the editor, which allows me to compile and keep the active connections running after a hot reload.
Demo projects are not really available. It can use hybrid TCP/UDP yes, but it’s not supported out of the box. By default, we instead use a channel based approach where you can set the QoS.
yeah sorry updated demo projects are an essential to me, networking isn’t easy and trying to make sense of another multiplayer framework without a quick demo project to see what it has as features to see it working and then look at the working code is a huge help. I did notice you had pretty old demo project for mlapi that was the github account but again should ideally be an example project folder that just comes bundled with the latest releases that way it works with the latest source and can be removed in the project, probably helps if the example project doesn’t need any changes to project settings aswel.
It seems no framework is really supporting it out of the box or providing a example project of it working, I wouldn’t know how it could be supported going by the fact it isn’t already supported makes me think it’s not that easy to add in the framework otherwise it would already be.
SmartFoxServer 2X provides TCP and UDP out of the box and you can decide which requests use either of the two.
Demos are available for multiple platform, Unity included. The FPS demo specifically uses both TCP and UDP. http://docs2x.smartfoxserver.com/ExamplesUnity/fps
Had a bunch of conflicts with Websockets with Smartfox because every framework wants to use the freaking names for things and not use namespaces… not really good seeing as it’s a bunch of dll’s