I'm making an MMO style game in my spare time for kicks, I've been researching more and more into networking for video games and I've mostly been learning about Quake and Sources networking implementation where they have an authoritative server with a snapshot system where the client receives snapshots that reflect the current state, and the clients will send their input to the server and the server will simulate the game, etc.

Is this what most MMO games use in terms of their networking? I ask this because as I'm implementing it, it seems very expensive if you want a lot of players*, whereas the networking architecture seems more like it was designed for Quake or Source games where it's mostly shooter type stuff where you only have maybe 10 players at a time, sometimes you have 30 or so.

* To elaborate here, I mean that having even 10 players it costs a lot to send snapshots back and forth in terms of bandwidth, it can pretty quickly add up to megabytes. Is this normal? Is this expensive? I don't do a lot of network programming so I'm not particularly sure what is cheap or expensive in terms of bandwidth.

I've currently implemented most of this system, though I've added regions so that the world is split up into multiple areas so that entities in region A don't care about the events, particles, and other entities, etc. in region B or C, D, and so on.

up vote 1 down vote accepted

You simply don't send the whole snapshot, but only the relevant information.

The map, the 3D architecture, the client is supposed to know that, no need to send it everytime, just tell him he need to load the file levelX.3d.

And so on so forth, until you only send the information that are important / usefull if faked, usually the position of each player, their direction, and their actions.

With the position and direction, you can predict client side where each player will be on the next few frame, their action to know if you need to use a animation.

The client refresh the data based on what the server tell him, this is why on a bad network, you see player "teleporting", it's just the client rectifying the information.

The client don't send the whole snapshot either, but only his position, direction and action, the server verify if the data is coherent (if the player teleported...), and send him back the information of all the over player.

  • Yeah that's what I do, I only send player positions and their velocity, and because of my region setup I send even less because I only send the packets of nearby players rather than players in a complete different area. Though for 30 players its something like 720 bytes, which seems like a lot if im sending snapshots frequently from the server. Unless this is not a lot at all? – Jon Flow Aug 15 '16 at 21:19
  • 720bytes is almost nothing, especially for 30players, I ve seen mobile games sending more for a quarter of the players. You didn't said the update frequency, but at 1/sec, it is only ~43kb/s. Also, unless you experience, or already have, bandwith problem, you can usually not care about it and just measure how bandwith you will need for the expected number of player. On a Azure Free server, you seems to have 5GB outbound free, assuming 30player/720bytes, you would need a update rate of ~7000/s, or seems like you have a healthy breathing room before starting to worry :) – DrakaSAN Aug 16 '16 at 7:25
  • Okay thanks! I wasn't sure since I haven't done much network programming so I thought this was quite a lot for 30 players. – Jon Flow Aug 16 '16 at 22:23
  • Of course, once you are at the point where you need to buy the server, it will be a good idea to measure the data sent by player, factor by the number of expected player, add some to have some breathing room, and see if the cost is okay at this price, and reduce update frequency or data sent by update to reduce the total data sent if neccessary to get the right price point, but as of now you should do fine :) – DrakaSAN Aug 17 '16 at 8:32
  • Parfait! I already have a little server I'm testing on from DO, so I think things are ok. My main concern was bandwidth, but I think given what you've said at 700 is bytes for 30 players and a reasonably low update frequency, I don't think it would ever go over the 1TB bandwidth allowance. – Jon Flow Aug 17 '16 at 13:17

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.