Unity + Socket.io

Distributed Authority Framework

An example of multiplayer architecture with “smart” clients.
The clients (Unity) do most of the work; the server (node.js) mostly validates and broadcast the changes of state. All the information is included in the README file and in the code itself:

Github repository server

Github repository client

Setup and overview video

.

 

Dumb Clients + Authoritative Server Example

MMORPS  – a real-time massively multiplayer Rock Paper Scissor.
This is implemented in node.js + p5.

Since most of the logic is on the server side we can keep the server as it is a make an equivalent client in Unity.

Unity MMORPS – This repository is almost identical to the game above on the server side but can render HYPER REALISTIC GRAPHICS thanks to Unity.

The topics are all in the README file

 

Alternatives

Normcore.io

Normcore is a multiplayer networking plugin for Unity. Its emphasis is on social VR but it works well for screen based applications as well.
The plug-in works in tandem with a cloud service.

Here are some pro and cons:

Pros:
* You don’t have to care about the server side. Normcore takes care of the synchronization across clients
* It’s designed specifically for Unity and comes with handy components
* It supports persistent objects from the get-go
* It’s actively maintained by professionals, with AR/VR features being added regularly
* The free version is generous and there is a pay-as-you go option that is appropriate for small projects
* Social VR advanced components like Voice chat, avatar mapping

Cons:
* Normcore is subscription-based, if you go over your quota and/or if you don’t pay the monthly fee your project stops working
* Like every cloud service, if it goes out of business or it gets acquired and shut down, your project stops working
* While plain socket.io is open source, Normcore is a complex proprietary plugin. If Glitch.com shuts down, you can move your node.js projects elsewhere with minimum effort. If Normcore disappears or changes its rates or terms of service, you have to remake most of your project
* Not having control over the server side means that you may not be able to implement some of the less common features
* Normcore doesn’t work with WebGL, so you won’t be able to make **browser** games
* It’s a new plugin and there is almost ZERO documentation and no community around it

Photon

Photon  – it’s a mature multiplayer suite of services that integrates with all engines. It seems targeted to casual multiplayer games with a small amount of players per room.

The pro and cons are the same as in normcore with the difference that it’s more difficult to use but presumably more reliable both in terms of infrastructure and engineering, and in the long-term sustainability as a business – they’ve been around since 2003.