Monday, November 19, 2012

Unity Networking is easy? part -1-


Decisions, Descisions

There are quite a few solutions to Unity3d multiplayer frameworks. The bottom line is you can use the free unity3d native networking for basic-needs or 3rd-party solutions for a cost. I used the free version for prototyping purposes. more details on this towards the end of this post.
I will go over 3 of the options. If you want a more in-detail explanation,see: comparing photon, uLink and unity3d and,  This table includes a dozen options.

Unity itself 

Out of the box unity provides networking-libraries, ability to run a unity instance as a dedicated/non-dedicated server, which you need to host yourself , and a "lobby-manager" called the Master-Server which is hosted by unity and good for low-scale.
Cost : code is free, hosting is not.
Problems:  unkown scale, not-very-mature-code, see:

Photon

Non-unity specific which means server code can`t use Unity physics/colliders.
For very low-scale, provide SaaS (PhotonCloud). but it`s limited to 500 message per second per room, which means, for a fast-moving game (15 update FPS) only ~5 users.  Also the SaaS solution limits the server-logic.
For larger scale or more server-logic freedom, you need to rent and install a dedicated server.
Cost : small PaaS free . For bigger it costs per server and hosting.
Problems: non-unity server-logic, SaaS is impractical for fast/big games.

uLink

Unity based MMO Server, which built upon and improves the problems/scale of Unity libraries.
Cost : for indie 550Euro per title license. hosting not included..
Problems: the cost.