Multiplayer Networking Solutions Review: Photon, uLink, DarkRift, Forge, and PlayFab

Hello community! I’m a hobbiest game developer who has a passion for competitive multiplayer games. For a high school project, I’m making a multiplayer lockstep BRTS game that loosely follows the networking framework of Age of Empires and Starcraft 2. In order to reduce bandwidth demand on players, all commands and confirmations will be facilitated by a server which is why I’ve looked into a host of networking solutions. This is somewhat of a chronicle of my journey through developing the multiplayer part of my game and the things I’ve learned on the way about the various tools I’ve used. I hope this helps other people in their quest to make their games. Without further ado…

Photon Cloud: Photon is the most popular networking solution on the asset store for good reason. It’s super accessible and provides an out-of-the-box multiplayer game that’s incredibly easy to set up. Further into development, however, I found many pitfalls in Photon Cloud. During the holiday sale for Photon+, I became overeager and bought it to find out that it unfortunately wouldn’t work for my game.

Firstly, it’s the large overhead. Photon’s binary protocol is very inefficient compared to that of networking solutions like DarkRift. Of course, this provides developers easy reliable RPC’s but at the cost of lag and high bandwidth.

In addition, Photon Cloud servers don’t allow custom server logic. This makes it impractical for many games. For my game, this means I can’t have a server that processes commands and confirmations. The server would be ‘dumb’ and relay every single command and confirmation very inefficiently. This is made worse by the high overhead so much so that my game ((12 players, 2 commands + 2 confirmations)/second) would be impossible for anything but the fastest of connections. There are other problems with Photon Cloud explained here.

The only way to run custom logic is to modify the server sdk and host the servers yourself so I proceeded to do that. Implementing what I needed turned out to be a very difficult task as the documentation wasn’t very clear. For a while, I wasn’t sure which script to edit or how to call my custom operations but eventually found out through the great support of its community. There’s also the pricing issue. Developers have to pay $3500 to have over 500CCU which many successful games need.

Photon does have merits though. Creating and joining rooms is as using a single built-in function. There’s in-built load balancing on the Cloud for efficiency of room instances. Photon is extremely easy to set up and the team is very helpful to you for your first stages of development. Photon turned me from a person clueless about networking into someone who knows how to set up a decent multiplayer game. It’s what I can call my gateway to networking, and I recommend it for anyone wanting to prototype or learn how to make a multiplayer game.

uLink: I’ve only worked with the trial version of uLink that doesn’t include the game managers uLobby and uZone. I can say first off that uLink isn’t hobbiest friendly at all, costing upwards $600 for all the essential features. I wasn’t able to test the server distribution system at all so all I got to do was play with the example locally.

The main thing going for uLink is that it runs in Unity instances. This means you can have servers that simulate physics, player interactions, and everything about a game. Cheating can be 100% done away with. This is especially necessary for large scale games that have to provide players with fair play.

uLink has been tried and proven by games such as Transformers Universe and Shadowgun: Deadzone but I’m hesitant to extrapolate the same potential success and appropriateness to my projects because these were created by large companies with specialists. There’s no telling how much of the out-of-the-box functions of uLink apply to them.

For my game, uLink won’t work or rather would be inefficient because my game only requires the server to process commands and confirmations in pure .net logic - no simulation required.

Update: uLink now has a trial version! I haven’t gotten to using it since I’ve stuck to DarkRift but don’t let my review stop you from testing it out for yourself.

Forge: uLink definitely fills a niche in Unity networking by allowing for authoritative servers but there’s a rising star that might be competing for the same niche.

Forge is a very new networking solution currently in its Beta stages. There’s a lot of community support for this because of the potential in it. Like uLink, it runs in Unity instances and so can simulate physics, players, etc. and prevent cheating. I’ve tested it and it works like a charm. It’s multithreaded so is very performance friendly - expect to be able to host many instances on a single computer, all managed by an aptly named extension called The Arbiter.

The primary developer has hinted at database integration which means accounts, player stats, and more for all! In addition, future plans also seek to take authoritative servers a step further by providing a cloud to run Forge on.

Recent developments have created a bare metal server that can be run just as efficiently as Photon or any other .net based server solution.

Update: Upon further exploration, I found that Forge is, like DarkRift, is event driven. In addition, there are many built-in pieces of functionality that come out of the box. Easy to use, efficient, and limitless! A bare metal version is also going to be released soon that gets rid of the overhead of Unity instances for those games that don’t need physics or simulation. Forge is one of the most ambitious and complete networking solution. I can’t even imagine how complete it will by its final release. It turns out Forge is the right one for me.

DarkRift: To me, DarkRift is like Victoria in How I Met Your Mother. She is almost ‘The One’, so close that it’s tragic she isn’t. DarkRift is incredibly fast, creating only 13 bytes of overhead in an operation and writing custom server logic for it is as easy as coding my game client side. It’s built in C# and has a very intuitive API for both server and client. I could see from the start that this networking solution was built for making plugins. Unfortunately, because of the extreme flexibility, this solution doesn’t come out-of-the-box with many features other networking solutions have like RPC’s or rooms. This is why it was nearly perfect for me, because the RPC’s and room system could be built from the ground up to accommodate my game.

Writing server plugins might seem like a daunting task compared to plugging in an IP address or a Cloud validation number and clicking run but it’s incredibly easy. I was able to get a room and matchmaking system that was completely built on top of my lockstep system up in an hour. Plus, the plugins are made to be shared (I can send anyone my lockstep plugin for DarkRift if they need it).

Not only is DarkRift exceptionally fast in bandwidth, it’s also fast in performance. It’s super efficient and uses only between 0.0% and 0.1% of my CPU when idle and scales very well so if you need a fast, flexible, and lightweight server solution, DarkRift is the way to go

The only problem is that DarkRift isn’t very big. It’s made by a one man team and so doesn’t have access to some extraneous features like an integrated Cloud or a prosperous community. Regardless, the documentation is very clear and got me coding my own plugins within 20 minutes of opening the ‘Getting Started’ PDF. The author has been extremely responsive to my requests for features and information. This is an asset that deserves to have just as much community support as the top in the store and it’s a shame that it doesn’t.

This is an asset that will give your game the fastest possible multiplayer and lightest weight servers. Hopefully in the future, a dedicated community will flock around DarkRift and a variety of open source plugins will crop up. It’s gotten this far with 1 person - how far can it get with a community?

Conclusion: There are many other networking solutions out there that aren’t listed but are still valid. There are also many types of games that need different back-ends. Small-scale MMORPG’s could make use of Photon’s dedicated servers and sufficient operations. FPS’s could use Forge or uLink for authoritative servers simulating events and actions for a cheat-free environment. Games like mine, ones that require specialized data processing, should definitely go for the more flexible and lightweight ones like DarkRift and Forge.

DarkRift and Forge are neck to neck in flexibility, performance, and ease of use but DarkRift is the winner in bandwidth efficiency. Forge will provide you with more out-of-le-box features so if you’re new to networking, I would recommend trying out the Beta. If you’ve got an arsenel of c# skills, give DarkRift a shot and you might fall in love with it as I did!

31 Likes

Thanks for the kind words and all your help with future development! Looks like I’ve got a lot of work to do!

Jamie (that one man DarkRift team :wink:

14 Likes

As I want to re-iterate what I said on our forum post.

This is a great review for everyone to look at for Multiplayer solutions currently. We are still in development and keeping our heads and ears up and running as much as possible so that we may fill the needs of the many. Thank you for taking the time and mentioning us, glad that this is out there so that people can have an idea of solutions that are out there currently and what is still being worked on. :slight_smile: (from the Forge team)

6 Likes

used most of them and i agree,
not all fit the needs for every game, so depending on the game needs.

now, there are more unity networking plugins that were not mentioned,
free open source:
-massivenet, runs inside unity server instance like ulink or Forge, tailored for mmos seamless large open worlds, (no room based games tho).
-PNet c# console standalone unity networking like server for room based games .

commercial:
-smartfox server java server for mmos or roomed based games.
-electrotank, same as smartfox,
-Tnet c# server for room based games works like photon cloud like a relay where clients are authoritative, but you can host anywhere and no monthly fees.
-appwarp, nice java server like smartfox but cheaper.

and much more.

1 Like

I am confused about PlayFab,
last i read about it is not an actual networking engine, is more lika a backend-as-a-service
for storing and retriving stats, right? or am i confused?
as far as i know you still need a networking engine to be able to run multiplayer games.

maybe i am wrong about it, since i dont like anything that has to do with highjacking my user base db and still pay them a monthly fee, that is why i have never used it.
what i mean is i like to host my own servers and dbs where i want.

Oh, thanks for mentioning those. I think after I find some time I’ll try out those other networking plugins and scribble about them. It’ll be a great learning experience.

Actually, I just found out I might be able to use DarkRift with PlayFab. The world has become perfect! I made a wrong assumption. You’re right, PlayFab mainly provides the account and database back-end for your game and the networking solution you use with it is up to you. Yeah, it is kind of scary for another company to manage your data but they’ve already helped produced some notable games and have proven their trustworthiness to me.

How about Bolt (http://www.boltengine.com)? I think it has the potential to be the best one, but I have just started using it.

I’ve never worked with Bolt before but it sure does look like it has many cool features.

Cool reviews!

You do mention Photon Server, but you really should look more into it. It is awesome! Takes a bit time to get into the framework but then it does everything you need for your game!

I love how Photon can automatically match players into rooms and how easy it is to send an RPC. The OnSerializedPhotonView I can see be useful for small FPS games. There are two main problems though: 1. I can’t run custom code on the Cloud and 2. there’s high overhead. #2 can be dealt with by implement clever server logic but #1 is fatal.

I think just to take advantage of the ease of use of Photon Cloud, I would use it if it allowed me to upload custom server code but that’s unfortunately not the case. As I’ve mentioned before, it would be nearly impossible to network a game with that much overhead per operation without custom server logic (by my calculations, upwards 20 KB per player).

I am not talking about PUN/Photon Cloud but Photon Server.

Oh, sorry I misunderstood. For just the server I’d rather use DarkRift. Creating a custom operation is as easy as adding a method to a delegate. Plus, there’s a lot less overhead being sent.

What overhead did you get with custom events/operations on Photon Server?

Was pretty effective when we used it on a real-time game at a game company i worked at. Also Photon Server offers great load-balancing and more right of the bat. Overall when you get used to it, it is pretty easy to use.

What kind of game did you make? The overhead I’m talking about is the wrapper for 1 reliable packet. ~50 bytes going and and 24 bytes coming back.

My game requires about 2 commands a second, each command consisting of a send and an ACK message back for 12 players. This ACK message is separate from Photon’s ACK and so requires yet another operation sent out. Without custom server logic, this can get pretty hectic but with custom server logic, clients will only have to communicate with the server and both server and client can aggregate packet sends.

Anyways, I just don’t see the big benefit of using Photon over DarkRift. The major thing is the matchmaking system but I have to set up a custom one with ELO anyways.

1 Like

Again you are confusing PUN and Photon Server?. There is “no” match making as such with Photon Server, you can get some help with their Lite and LiteLobby system, but i always wrote my own matchmaking.

// CLIENT SIDE (UNITY) CUSTOM MESSAGE - JUST SENT A BYTE,OBJECT DICTIONARY WITH BYTE THAT //DEFINES MESSAGE TYPE
public void SendCustomMessaage(Dictionary<byte, object> info)
{
      Peer.OpCustom((byte)OperationCalls.CustomOperation, info, true);
}

//CUSTOM PHOTON SERVER SIDE LOGIC - PART OF A SWITCH STATEMENT

                case (byte)Requests.Chat:
                    {
                        if (!data.ContainsKey((byte)Data.ChatMessage))
                            return;

                        string message = (string)data[(byte)Data.ChatMessage];

                        EventData eventData = new EventData((byte)Events.Chat, new Dictionary<byte, object> { {                       (byte)Data.ChatMessage, message } });

                        foreach (GunjitsuClient gunjistuClient in GunjitsuLobby.Instance._players)
                        {
                            gunjistuClient.SendEvent(eventData, sendParameters);
                        }
                    }
                    break;

Pretty easy to pack a byte, object dictionary and use it server side. Never tested it but don’t believe this has a high overhead.

Oh and it was a soccer game for 2 - 20 players per game (with 20 players each controlled one player each), updating the players at around 15 msg/second each i think.

The only version of Photon I’ve tried is the one on the Asset store and the server SDK on their website. The asset store version is compatible with both Cloud and self hosted servers.

One thing is I don’t need to send a dictionary. I a pack all commands in a single long integer that scales to be a short or int if small enough. Like I said, I know I can get it to work with Photon but I have better options.

I’m actually considering maybe picking up Photon again once the integration with PlayFab finishes.

Ah yeah Photon Server is not on the Asset Store, it is a completely different beast! And you can send a short int if thats what you need to do.

It is one of the best C#/C++ frameworks for custom servers out there (personally i don’t know a better one).

Yeah, I’ve taken a crack at it after finding out the Cloud wouldn’t work for me. I still prefer DarkRift’s customization but it’s probably just a personal preference. Anyways, the bandwidth efficiency wins it for me.

yup, same here, i just dont dig photon standalone server and even worse the cloud, it is just a joke to my taste to relay messages only and leaving the client exposed for hacks and cheats., plus is so damn complex if you want to use the standalone server, plus is expensive their license model,

last i checked was like 4k for 1 server only,
you cant do much with one server if you try to host a mid size game.
the server comes bare bone, minimal features, you have to code everything from scratch, some of us dont really have time for dealing with that, rather use the time to create your game instead of writing core server features.

you get 100 free ccu, but cant do much with it. you have to pay their asking price if you want to do more then that,
also, another reason is that is a window only server, no multiplatform.

photon has so many cons than pros for me, i rather use something else instead.
nothing personal against it, it just not a bit appealing for my taste. sorry.

no one can review bolt ? its sound something very promising, im actually using Photon server for a project but i will probably switch on bolt on next project, im interested in any information from people who have battle tested bolt on their game.
I found it a bit difficult to start, but its probably a biased opinion as im more experienced with photon and the method to sync event are a bit different.