Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Networking and MMOs?

BestinnaBestinna Member UncommonPosts: 190
edited December 2016 in The Pub at MMORPG.COM
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

  • JamesPJamesP Member UncommonPosts: 595
    Really Depends on what you View a MMO as being... With Unity3d and the Atavism MMO Server you can get 500+ players in a single Realm spread out over multiple zones. Haven't looked into exactly what they have for scaling but if they have their scaling implemented already you could even potentially get thousands in a single Realm with enough Server hardware. Making MMOs is increasingly becoming easier. It's still time consuming and expensive though but technologically it's much easier then even what it was 4 years ago.

    Company Owner
    MMO Interactive

  • QuizzicalQuizzical Member LegendaryPosts: 25,483
    As with many issues in programming, it's sometimes a question of whether you're willing to accept something that kind of works, but not very well and not the way you want, or whether you're willing to put in the work to roll your own and make something that does exactly what you want and does it well.  It's okay to use off-the-shelf code or assets that do exactly what you want and do it well in the situations where you happen to be able to find it, but if that's your entire game, it's at best going to be a mediocre knock-off of something else.

    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.
  • CleffyCleffy Member RarePosts: 6,413
    There are only a few engines that are built with MMOs in mind. Nearly all modern engines are capable of supporting multiplayer. Out of MMO built engines, only 2 are licensable. They are Hero Engine and Big World engine. Unity and to some extent Unreal are possible to support a lot in multiplayer, but there are several more networking layers to offer like the payment gate and storing character data. Hero and Big World will support them out of the box.
    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.
    AAAMEOW
  • QuizzicalQuizzical Member LegendaryPosts: 25,483
    To give an example of why what you need to do varies wildly by game, consider the question of how fast a character accelerates.  For a slow-paced game like WoW, you could have a character take half a second to go from zero to top speed and it will feel smooth.  That a player's velocity has barely changed when he starts moving lets you cover up a lot of latency, as you can make it look like another player who moved unexpectedly just accelerates faster on your screen while still moving continuously at normal speeds.  But that's a non-starter in a game like Elsword or Spiral Knights with combat based on dodging attacks by getting out of the way, or even a game heavy on knockbacks that can disrupt skills and movement.
  • QuizzicalQuizzical Member LegendaryPosts: 25,483
    Cleffy said:
    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.
    To that I'd like to add that using off the shelf code is the enemy of efficiency.  General purpose code has to be able to handle all sorts of weird things, and there are often huge efficiency gains to be had by baking in assumptions that you don't need to handle particular things that a lot of other people do need to handle.  For example, you can commonly get away with less frequent updates for more distant players (they're off your screen, anyway!), but how much less frequent, how far away, and even what counts as "distant" (which can depend on a player's attack range or monitor resolution even within a given game) can vary a lot.
Sign In or Register to comment.