Pages

Monday, November 28, 2011

MMO development with unity

As we work on our project mind farming, We experience different things. One of our main obsticles when starting the development was choosing the game engine and networking stuff. we tested multiple MMO middlewares but in that time (about 2.5 years ago) none of them seem ok for a small team like us. mostly client updates were not as fast as we want and iterative development and fast content addition was hard. At this time among them, surely hero engine is the best option if someone wants to choose between those packages to make an MMO. if you want to use one of the popular engines like unity, cry engine or unreal as your client side tech, then you either have to develop your own server side solution or pick one of the existings.
Too much of our time spent in researching the market for a good MMO middleware or a server side solution for unity, after it turned out that we don't want to use one of those MMO only middlewares and we want unity as our client engine for multiple reasons including cross platform ability and ease of iterative development and content pipeline then we had to do something about the server. Different multiplayer games have different needs. we planned for the most complex ones. a turn based game with asynch play is multiplayer and EVE online is too. our game was partly synch and partly asynch. partly real time and partly not that much. so we needed a complete server side solution with support of physics or at least collision detection. we had to find it or build it.
At first the only option was smartfox and photon was a new option. it was obvious that photon is much better so we downloaded the manual and APIs and started reading. we thought of using physx wrappers for .NET and using unity apps in our servers but both attempts were not good for the small team of ours and our budget. we had a big vision with two coders and less than 20K dollars of money in that time. we wanted to start it but not in a path that we know that it's only headache. we waited and other options were comming,
netdog for example was one of them. the problem was that an MMO need much more than message delivery libraries. we needed easy database connectivity and management, load balancing, physics and bandwidth management. the server side logic also had to be developed in C++ which is good in terms of performance but is not a good idea to make gameplay using C++ for a team with 2 coders.
then we heared the news about hero cloud. it was nice. hero engine had all of the server side tech that we want and the client was a good thing. this option was free to start with, so risk was much lower. oh did i mensioned that 2 years gone with these researches and developing small advergames and code frameworks for others as contract job? Hero was good but the client was not unity and they wanted 30% of our money. another 30% was facebook's cut so after facebook announced it we thought that we should think more.
Then we decided to lower our expectations at first release and use a turn based social mechanics engine called roarengine. we started implementing the plugin for using it with unity. it again turned out that it limits us much in terms of game mechanics of the main farm theme enough to not be able to create the original thing that we want. your middleware should help you and break the limitations so if it limits you it might not be a good option.
in middle of that stuff, just in a random way i saw the name of uLink in a post in unity multiplayer forums. what's this? another fast message delivery library? let's take a look! The product was not ready yet. We did not have the money to buy the license and do our other stuff too but i am somehow good in understanding what tech to choose. previously i saw the potential in unity when it was a young mac only product with much less features. i am not a big visionary that foresees the next big thing in tech but i am good at it. my teammates are too. indied i emailed their CEO to see what's going there. the pikko server was really interesting and the description in the site was in one way or another a complete server side MMO middleware. database access and management, bandwidth optimization and network LOD, lobby system, load balancing, fast message delivery and reliable UDP and much more. it was a great description. it changed later a little and some small stuff like facebook integration were removed from the list of the features in the first release but it's still awesome.
Christian and i talked much and he fortunately loved our idea of making a real 3d farming game which is not turn based and is a real game for facebook and social networks. we loved their tech and they loved our idea so we solved other things together. We bought our license and got early access. Now we are moving forward and not only this tech is not limiting our vision but it allowed us to think about implementing things which were not possible with other technologies. even some of them that pikko server offers are not possible in those expensive MMO middlewares. I cannot talk on our experience with MMO middlewares due to their NDA's content but i can talk on unityPark suite that we are happily using.
The experience is really what we wanted. all development is going in unity. Weather server or client script it's written in unity and using all of its framework and physics and collision detection. The database system is great. It's scalable, fast and easy to use. We developed the whole serialization of the game in few days. We also don't have to write too many XML files (like most MMO middlewares) or other sorts of definitions for data to be saved automatically. Instead in a small method we just write debuggable C# code to say what and how should be saved on the database. Content pipeline of the game would be great because we are free to use unity's pipeline and our own database and nothing is dictated. We make the content pipeline of the game as easy as possible. it's just a matter of minutes now to create a new crop type and add it to the system.
In terms of client side features, unity might not have some of the common MMO features in itself but thanks to it's asset store many of those are available for a good price. for example you can find good mesh morphing in asset store which is an important feature for creating customizable avatars. There are packages for weather system and day/night cycles. again it might not be all of that those MMO middlewares offer but you have a cross platform engine which still is listening to it's customers and adds new features fast. it's becomming the industries number one development platform for many types of projects and if you ask me with the addition of UnityPark Suite it's a complete MMO development platform.
Now with Linux support for unity servers, prices will be much lower and server management will be much easier on a single platform. We'll soon publish a document on Unity's asset store for free which tries to help different people to choose the write networking middleware for their projects.