Choosing a networking solution for an MMO.

Hello,
For my final project at university I chose to do an MMO (big mistake) and am currently thinking of unity 3d as a possible platform to make it in. It would be a very sure thing except because of the available networking solutions.

The architecture I am implementing features a world with any number of zones and in each zone any number of dungeons. Zones and Dungeons would be authoritative servers controling game logic with the diference that zones can house “any” number of players and dungeons are limited to groups of 4. There would be independent chat between players in the zones and in the dungeons but there would also be a general chat available to anyone in (at least) big cities and group/guild chat. And also http access to a web server to handle the database access.

This is the arquitecture i’m going for.

I know the Network class can’t handle this type of game and have been looking for alternatives and the one that caught my eye was Photon but i have read in this post that a Photon Server can’t be fully integrated in Unity so it has no access to geometry and can’t be fully authoritative. I like how it has Area of Interest already fully implemented but really want an authoritative server.
My questions are:
How do you handle physics with this solution? I know server could still handle movement but not wether or not the “npc” has bumped a wall or fell off a ledge. One way would be, when an npc was seen by a player then the player client would take control of that npc. Not sure I like that solution.

What about SmartFoxServer? Does SMF fully integrate with unity3d and has access to geometry or is it the same as Photon?

Thank you for your atention.

I hope you guys don’t mind but to avoid cross-posting, I’m going to answer on our forum, where the thread also has a few replies:
http://forum.exitgames.com/viewtopic.php?f=17&t=1676

SFS integrates even less as you code in Java, not C#, so you get 2 distinct codebases.

There is nothing that is highly scaleable and integrates with Unity as that would no longer be scalable at all as unity is not exactly scaleable or even threading friendly.

The only networking that I know would help, if you don’t want to create a solution basing on a network backend with unity simulation clients, is uLink their PikkoServer technology from MuchDifferent (http://muchdifferent.com/?page=game-unitypark ) but it will also be priced accordingly (you save months of work and that just has its price)

I’m gonna be rough and tell it like it is: Give up, unless you have a couple of years to spend on building your game, you will not come even close to being able to build an MMO. You also seem to lack a basic understanding of how networking and unity fit together.

A large distributed simulation like an MMO is probably the last step a professional would take, after having built several other, simpler, systems before.

Just forget about it, pick another idea, you will fail. Sorry :slight_smile:

You are assuming too much about me and my project. First off, if you notice correctly I did say Big mistake on my original post and that is not because I don’t think I can make it but because it is a gigantic endeavour for someone who is currently employed and has to do this on the sides. In the age of the internet it is unfeasable that a project (in my university) has good grades without considering online features and since I really wanted to make a game I decided to make one using the “free to play” business model and that doesn’t fit IMO with anything other then MMO since the only reason ppl pay for items is to be able to show it off to their online friends.
The project has been set in stone and I can’t change it on a whim. I either retake the class next semester with a new project and that would mean paying for another year of tution so i’m gonna make my damn hardest to pass and although the official delivery data is september the project delivery can be postponed up to 18 months.
I can indeed fail just as long as the process of researching diferent solutions with their pros and cons properly documented is well done, with also well done software design documents and what went wrong and presenting possible solutions.
Lastly, since my project is in fact the “Free to Play” business model I really don’t have to implement a scalable, high performance fully featured mmo game, but instead have to make a prototype of a game that features the things present in my game design document like group chat accross zones, grouping, instances and the possibility to access a website where the player can aquire special items to show off ingame.
Scalability and high performance will not be tested but will just need to be documented. But while I am still researching I want to have these requirements in mind. And that is because if I so desire I can keep working on it after the project is delivered and it’s much easier to have these considerations during conception then to go back and redo everything from scratch when you realise you’ve messed up.

So if you are telling me that I can’t do this in Unity then ok i’ll go back to JME3 where the architecture was already implemented but lacks the ease of creating great looking scenes with a few clicks of a button.

Okay.

Let’s get one things straight:

  • You’re in deep shit.

The question now is, what’s the absolute minimum you can get away with?

For a start - let’s get rid of all the crap that is possible. Currently you have:

  • Game Client
  • Chat Server
  • Game Server
  • WebSite Server
  • Database

If I was doing this I’d do:

  • Game Client

By using the game client, and a system like Photon Cloud [assuming it meets some basic requirements] you can actually sit down and build a simple MMO.

The other elements you had are ‘nice-to-haves’, but greatly increase the complexity of the build. If you insist on having them - build them AFTERWARDS. For example - the out of room chat system is a nice feature to have, and can be ‘dropped in’ once everything else is done.

So yeah, get back to us with what you must have at an absolute minimum.

Absolute minimum: game client that has acess (either directly or preferably thorugh server) to the web server that houses the site and controls database access, so players can acess the items they bought in store.

Assume that’s the actual requirements, you’ve got a fair bit of room to maneuver. Though I would note in my documentation that those are somewhat arbitrary.

For example - you can make your game Text Based or 2D. Furthermore there’s nothing saying MMO - so you can opt for the much simpler [though still fairly complicated] MOG.

Sit down and play a bit of Dead-Frontier - it might give you a couple idea’s.

You might want to look at the free examples that come with ElectroServer. I assume that SFS has similar examples, but haven’t looked at it closely in more than a year. If you combine the AvatarChat example with DatabaseWithJDBI, then you have the basis for your database connections, your virtual world, and your chat right there.

The project submission states a 3D MMO :slight_smile:

I’m surprised that your faculty advisor let you choose an MMO for your project. I used to be college professor, and it was definitely my job to help my advisees choose final projects that were both ambitious enough to be worthwhile but also small enough that they would have a chance of finishing them. A 3D virtual world is possible. A scalable 3D virtual world that can handle 1000 concurrent users… that’s rough.

if you really want to build this (with little previous experience, it seems - not trying to be rude), I would say that your best bet is to sign up for the 3d buzz Unity + Photon MMO classes that are available on 3dbuzz.com. They will hold your hand the entire way and explain a lot of concepts for you, building an “MMO” (I put the quotation marks because they dont really build an MMO, but more of an RPG-MOG) from scratch.

I am sincerelly glad with your help and suggestions, but I am also shocked with such a defeatist attitude towards doing something you’ve never done before. I realise this isn’t exactly doing a standalone pong clone and that it encompasses a lot of areas of knowledge, and even admit it may have been naive to try, but to suggest that I should just give up is, well, discouraging XD

Regarding my teachers, they did have reservations about it but ultimatelly said it was my decision. Another thing said in my last meeting with them, when I showed them the arquitecture, is that I really don’t need to have concerns about scalability for now if at all.

So keeping up with the “brainstorming” another possibility would be Guild Wars type of MMO. They have main cities where everyone meets and then all the world is instanced and shared only with the party members. Isn’t this a kind of lobby > room example?

Look, to be frank. You’re not going to be able to build an MMO game yourself, ever. It’s just not going to happen. If by MMO you mean supporting at least 512+ players online at the same time in one big world. But, as you said - scalabilty is not an issue here for you, as it’s not going to be a “real” game. Fine, but then you’re not building an MMO, you’re building an Online RPG that you can play with 10 people or something.

The key in the “MMO” word is not the type of game play, but the amount of players online. The entire problem, and the reason I’m saying is that you won’t build an MMO yourself comes from how big of an engineering task the “Massive” part of “MMO” is. Building an online rpg for ~32 players? fine, no probs. Building one for 512 players? No, not really.

check out electroserver, its what we are using for our core site as well as our facebook-unity networking game. Our core site gets over thousands DAUs so, but it just as easily handle the 4 people your school project would see. Theres also many unity examples that can get your started.

Yes, the latter could be done room based. Even more so, if you don’t have to care about scalability.
In rooms, you might or might not implement a simple interest management (to get more players in a “city” room).

If the account, shop and inventory aspects are most interesting for this project (you named those as minimum req at least), I’d use rooms and focus on exactly accounts, items, etc. Persistence can be done through the game server or a separate connection to a web-server with http calls, I’d say.

Dafuq did I just read?

Authoritative servers handle database access by themselves, thus making the client accessing the database through http redundant.
On the other hand accessing the database through http is sluggish, once you try to fire 2000 queries to your database at the same time you will notice that well 13 second delays won’t really be tolerable by players.

A fun fact is that we’ve got a decent mmo server up and running for a graduating project at high school.

Basically you can go down one of two roads.
Either get Photon or whatsoever solution and do some basic “mmo” setup which could handle a handful of players and some basic stuff ( aka forget about server side physics calculations, pathfinding and so on ).
Or sit on your ass study some networking basics for couple of days, check out how other solutions work and do one yourself. On this one you will have to pretty much do a hell lot of work, but it could result in something that maybe some day eventually may become useful ( yes, maybe some day eventually may ).
Or do the above thing, BUT find someone to share and split the work ( a networking specialist who does well in C++ will do great ).

Anyway as of networking solutions I would go with either:
Badumna network suite,
Python networking,
or Ace ( C++ library for manual server creation )

Actually there is no possible way I choose any of the two other solutions over Ace but that’s not on topic.

I’d have to agree that you may have taken on more than you can handle here. Since you seem to be determine to go forward my recommendation would be to use Photon for its ease of use, feature set and cost. That’s what we were using over at 3DBuzz.

It is possible to make a MMO with Unity by yourself all be it a very small scale one. The MMO tech demo which we had around 50 people in simultaneously with combat, spells, quests, chat, inventory, zones etc. Took me about 6 months to create the client for. There were two other people working on the server, inventory and chat systems. If I had to do it all alone it would of probably taken a further 3 months of work.

The MMO class has pretty much come to a screeching halt since I left and focus has shifted to other projects at the moment. Though it might pick up momentum again at some point. That project was being designed to a much larger scale. Some of the terrain R&D tests that I did where procedural terrains in the 100’s of thousand of square miles that could be streamed in real time with no zoning. That system alone took me 8 months to build. Of course to be fair there was over 300 videos recorded documenting the process so that did slow me down quite a bit.

Not trying to discourage you but the time it will take to complete the project as describe it will take years not months of work if you go at it alone. Yes it can be done if you dedicate yourself to finishing it and give up all your free time for the next couple years. Find some of the more professional looking casual games in these forums. You’ll find even those with small teams have taken a better part of a year or more to make. Yet you will be trying to creating an entire MMO by yourself.

One final thing as a reality check, the time I put in on the MMO class at 3DBuzz wasn’t measured in hundreds of hours but in thousands. Just be very sure you are willing to put that amount of effort in or it will fail.

Best of luck.

I was also really surprised to read that solution in the IBM article I mentioned but here’s what it has to say about it:

“The Web server serves up Web services that can retrieve and persist data. This loose, straightforward coupling of the gaming clients and servers with a Web and database back end along with HTTP allows for an elegant, simple, yet powerful MMO game architecture. Conceptually, it might help to think of the architecture as composed of two overarching components: the gaming server and client providing MOG functions, and the additional Web and database back end that adds MMO game functions.”

[edit]
Actually I didn’t mention the article in this thread.
http://www.ibm.com/developerworks/architecture/library/ar-powerup1/

I’m sorry dude - but I disagree. It IS possible to make a MMO in the time he has, and I’ll explain why:

Exactly: An MMO is simply a game that has a lot of players in the same universe/instance [depending on how ‘loose’ a definition you choose].

Imagine this:

A game with an imaginary ‘grid’. Each square on the grid contains one of the following:

  • Empty Space
  • Player Ship
  • Asteroid
  • Space Station
  • Planet

The game is ‘turn based’ - where the player can only move squares in discreet units [i.e. square by square]. Say the minimum ‘move delay’ is 1s, but due to the time of various actions the player might only average one movement action per 30 seconds. Actions might include: charging engines, mining asteroids, attacking adjacent cell, docking with station, performing sensor sweep, etc.

You would also have ship management, intergalactic trading system etc. to keep the player occupied.

Why is this design good?

Because the entire game data can be mapped to a DB very easily, and the interactions between items are trivial. You could build this using nothing but a DB and some Restful HTTP servers. The basic infrastructure would be a dozen lines of code. If you ever reach a performance limitation - just add in more servers! Everything is inherently scalable and that work has been done for you already!

This simple system could easily manage 10’s of thousands of CCU. Remember the goal here is to build a program - not necessarily get the millions of players :stuck_out_tongue:

So yes, it’s entirely possible to make a MMO in a few months. They key is knowing what is and is not needed.