Just out of curiosity, I've been reading about what it takes to create an MMO and up until this point the most difficult part to my understanding is the networking; getting your dropped item to show on everyone else's screen.
Everything I had read says this is a very complex step and incredibly hard to do, but, if it's so hard and MMOs are at the age they're at, wouldn't this step have been simplified by now? Isn't this a step you're basically allowed to just copy and paste from any other MMO?
Building an engine was probably complex in the beginning but now there are many and it is very simple.
Again, I only want to know out of curiosity, as many of the people who say it is impossible to make an MMO probably don't really understand what it takes and might want to hear from someone who does understand, and, as someone who also doesn't understand, I too would like to know.
Comments
Company Owner
MMO Interactive
Just how hard networking is depends on what you want to do. It takes tens of milliseconds to send something one-way over the Internet, so it's not possible for one player to find out what another player is doing right as the other player does it. This leaves you with several choices, none of which are desirable:
1) Moves don't become official until the server informs the client, so that moving your own character constantly feels really laggy.
2) You get to see your own position in real-time, but only get to see other players at the last official server position, so that rather than seeing where players are now, you see where they were 100-200 ms ago.
3) The server tries to predict where other players are on the basis that they'll keep going in the direction that they were, then has the character visibly warp or move extra fast to the correct location when another player did something unexpected.
4) You have some built-in delay to allow you to cover up latency and make everything look synchronized, which will annoy your players. For example, if using a skill roots you for a second before the skill fires, and other players see it start as soon as the server informs them so that it looks to others like you were only rooted for 900 ms, it doesn't look visibly wrong--but players will complain that using skills roots them.
Networking isn't always hard. For a turn-based game, you can do (2) and be done with it, as the delay doesn't matter. Without having searched myself, I'd expect that there is off-the-shelf code that can do a respectable job of this if latency doesn't matter. For a PVE game, you can do (2) for other players and have the server decide what mobs are going to do before they do it to give it time to broadcast the information. But (2) is game-breaking on a fast-paced PVP game.
Sometimes (4) is the way to go, but what you can get away with depends tremendously on the nature of your game. For a slow enough paced game that it won't feel intuitively laggy, sometimes (1) is the way to go; it certainly simplifies a lot of things. For either of these, whether it can work depends on whether your game mechanics have some natural, built-in delays that can be used to cover up latency.
If you need to see other players' positions accurately in real-time, as is commonly the case for PVP, you probably have to do (3). But exactly how to balance it best depends very strongly on the mechanics you're implementing.
And then you have to consider that networking code is not just sensitive to performance, but also to cheating. If players can see what is going on, then tell the server that they did such and such 200 ms ago and have the server believe it, that can be a massive exploit in a lot of games. If the server won't believe it, that can make a lot of games feel laggy. Dealing with random Internet lag is one thing, but you also have to deal with players trying to exploit your particular system to cheat, and sending arbitrarily weird information to the server to try to cheat. If you're careless with this, players could find ways to crash your server, not just the client. Careless network code can also create duping bugs, among other exploits.
And if that wasn't complicated enough, physics dictates that for two different people, to say that an event occurs at the same time for each of them doesn't have any actual physical meaning. At most, you can say that an event for each player occurred within some time interval of each other. When they're right next to each other, the difference is a rounding error, but spread out over the world it can easily be tens of milliseconds. And something happening tens of milliseconds sooner or later can easily be the difference between victory and defeat in a lot of games.
Once you have the engine, then it comes down to the actual hard tasks with current MMO games, getting in the content. Thousands of art assets, thousands of quests, thousands of NPCs, thousands of skills. This takes time and money. When it comes to generating content, Hero Engine is the best. However, it's an older engine so you won't get the best graphics.
As far as technology helping. For an MMO when there is movement, you have to send 1 packet to each person who can see the movement. If this is 32 people, you send out 32 packets not including redundancy. If there are 100 people, you send out 100 packets. Now if all those people also move you send out 100 packets to 100 people, or 10000 packets. There is only 1 way to deal with sending out this massive amount of packets. Make them as simple as possible or else you bog down your available bandwidth. The first thing MMOs had to do was make the networking portions as efficient as possible. There really isn't much that can be done when it's already as efficient as it can get.