1. #1
    Deleted

    How do calculations happen in a mmo game?

    Is this correct?
    - your CPU calculates all the numbers coming from your actions
    - the calculated data is uploaded to server (continuously, splitted in packets of information)
    - nearby players download your data (continuously, splitted in packets of information)
    - you as-well, keep download the data of nearby players
    - all of this happens in a bunch of milliseconds

    Questions:
    - What is the frequency at which packets of information are sent to server?
    - What's the size of these packets?
    - Can ALU (CPU's arithmetical logical unit) lags in WoW sometimes? What happens?

  2. #2
    Bloodsail Admiral Seregon's Avatar
    15+ Year Old Account
    Join Date
    Sep 2008
    Location
    Kristiansand, Norway
    Posts
    1,246
    I don't know much about best practices for these types of scenarios, but having damage calculated in the client seems somewhat unsafe. I'd say all the client does it instruct the server on what to do (where to move your character, what abilities you're using and so on) and the server calculates the results of these actions and makes them available to players in the vicinity.

  3. #3
    Deleted
    Quote Originally Posted by Seregon View Post
    I don't know much about best practices for these types of scenarios, but having damage calculated in the client seems somewhat unsafe. I'd say all the client does it instruct the server on what to do (where to move your character, what abilities you're using and so on) and the server calculates the results of these actions and makes them available to players in the vicinity.
    I'm sure that movements is calculates on your pc since when you lags you have no problems to move. Maybe you are right about actions.

  4. #4
    Quote Originally Posted by Ricirich91 View Post
    I'm sure that movements is calculates on your pc since when you lags you have no problems to move. Maybe you are right about actions.
    Most games allows the client to estimate where the player is going to end up when it sends a move action to the server. The estimated position is then updated once the client receives the location calculated by the server. This is what causes you to sometimes appear to move forward and teleporting back when you lag.

  5. #5
    Deleted
    There is absolutely nothing that others see about your gameplay mechanics being calculated by you. That would be a honey pot for very easy cheating. That stuff is calculated by the server very strictly.

    That being said, they may do some pre-calculations on your machine to show something before it's confirmed by the server. That would be secure because if it's cheated, it would still be ignored.

    And of course graphics calculations are all done on your PC. The server is just a "math numbers cruncher", it does not deal with anything visual other than coordinates etc.

    - - - Updated - - -

    Keep in mind though the game is largely a black box. Whatever we say here is common sense or derived from other programming practices. Blizzard will never reveal their source code unless they are bought by Carmack.

  6. #6
    Bloodsail Admiral Seregon's Avatar
    15+ Year Old Account
    Join Date
    Sep 2008
    Location
    Kristiansand, Norway
    Posts
    1,246
    Quote Originally Posted by Propelled View Post
    Most games allows the client to estimate where the player is going to end up when it sends a move action to the server. The estimated position is then updated once the client receives the location calculated by the server. This is what causes you to sometimes appear to move forward and teleporting back when you lag.
    I think you're both right in a sense. I think every action, be it movement or ability usage, are requests sent by the client to the server. The server then validates these requests and sends an "OK" back to the client if it accepts the action. Then the client updates accordingly. Now movement is somewhat different, because as Propelled says the client is allowed to move your character freely so as to not make it necessary to receive the "OK" from the server before actually moving. Having to wait for the OK would cause some weird behavior where you'd suddenly just stop moving because of a delayed or dropped package. Instead you experience what's known as rubberbanding where your client says to the server "I am at point X", but the server responds with "No you are in fact at point X - 10", and then your character suddenly moves 5 steps backwards. If there is too much of a discrepancy I've noticed the server decides to disconnect you instead. I am however quite impressed with how well movement works in WoW compared to a lot of other MMOs, so their implementation is clearly something that works really well.

    Quote Originally Posted by tobindax View Post
    Keep in mind though the game is largely a black box. Whatever we say here is common sense or derived from other programming practices.
    Indeed.
    Last edited by Seregon; 2015-10-09 at 11:37 AM.

  7. #7
    Deleted
    Yes, the server is practically a simulation machine. It only accepts input (in terms of gameplay). Under no circumstances it would accept ready simulated results by a user because that would be easy to cheat, unless Blizzard don't want to secure their game (and they do).


    Games usually pre-calculate some stuff on the client, e.g. the movement to make it smoother, but it always complies to the command of the server and the client will be teleported back to where it's supposed to be under corrupted data or other nonsensical data.


    You can practically see it in game with those players "running in place" or you running around but then being teleported back when lag ends, etc.
    Last edited by mmocdc260e8e2a; 2015-10-09 at 11:40 AM.

  8. #8
    Deleted
    Is that the reason that lot of hacks are related to movement speed? In the past I've seen lot of flying hack. Is that because movement is made in our client?

  9. #9
    Deleted
    Movement is not made on your client. It is only pre-calculated on the client to make it look smoother, for a time. However, the server has the final say on where you are supposed to be based on the input you gave it so it will teleport you back where you are supposed to be under nonsensical data input.


    The ways to cheat can be of all kinds but it's definitely not just "I sent the server a different location". There was another way they fooled it.

    If they only sent another location the server would just see "you can't run that fast silly".

  10. #10
    Quote Originally Posted by Ricirich91 View Post
    Is that the reason that lot of hacks are related to movement speed? In the past I've seen lot of flying hack. Is that because movement is made in our client?
    I was about to comment for that reason.
    Botting regularly shows movement which shouldn't be accessible to the player, such as fly hacks and underground gathering.
    Seems the server-side control of movement is insufficient, or is placing too much in the control of the client.
    Quote Originally Posted by DeadmanWalking View Post
    Your forgot to include the part where we blame casuals for everything because blizzard is catering to casuals when casuals got jack squat for new content the entire expansion, like new dungeons and scenarios.
    Quote Originally Posted by Reinaerd View Post
    T'is good to see there are still people valiantly putting the "Ass" in assumption.

  11. #11
    Quote Originally Posted by Ricirich91 View Post
    Is this correct?
    - your CPU calculates all the numbers coming from your actions
    - the calculated data is uploaded to server (continuously, splitted in packets of information)
    - nearby players download your data (continuously, splitted in packets of information)
    - you as-well, keep download the data of nearby players
    - all of this happens in a bunch of milliseconds

    Questions:
    - What is the frequency at which packets of information are sent to server?
    - What's the size of these packets?
    - Can ALU (CPU's arithmetical logical unit) lags in WoW sometimes? What happens?
    First and foremost, I recommend you to look at this presentation: I Shot You First! - Gameplay Networking in Halo: Reach. It will show you what is trusted to be done on client side and what can only be done by server.

    The answer to your first two question is Wireshark. Sniff your own traffic and see all the packets by yourself.
    For your third question:your network card always receives data and stores it into internal queues. Your CPU will eventually read and process the data when it's ready. Obviously, you are not sending any new data during your lag

  12. #12
    Deleted
    I bet they encrypt the input data from clients. It would need reverse engineering it. But it might be best to derive knowledge from other engines.


    An Engine that taught me a lot was Quake III. It was open source for a long time and I was hacking it for improving a mod.

    There I learned devs never want you to pre-calculate their gameplay for them, they only let you pre-calculate visuals.

  13. #13
    Deleted
    Quote Originally Posted by OneWay View Post
    it was around 10-20kb which is nothing, during the raid.

    In practice the absolute minimum is exchanged back and forth:

    OUT:
    - Your input (what keys you press) that's a very low amount of data
    - (Possibly) where you think you are, at what state you are. That might help smoothing things over after lag.

    IN:
    - Where you are supposed to be based on what you sent before. That info will teleport you back where you are supposed to be after lag, for example.
    - The coordinates of other players, other NPCs, their numbers, etc.
    - Other related gameplay data needed, what damage you did, etc.

    In general a lot of stuff are calculated by the client to smooth things over visually, but nothing gameplay related is accepted unless the server confirms it with its internal simulation. It has the final say and it's the ultimate governor. Otherwise cheating would be straightforward.

  14. #14
    Deleted
    Quote Originally Posted by tobindax View Post
    In practice the absolute minimum is exchanged back and forth:

    OUT:
    - Your input (what keys you press) that's a very low amount of data
    - (Possibly) where you think you are, at what state you are. That might help smoothing things over after lag.

    IN:
    - Where you are supposed to be based on what you sent before. That info will teleport you back where you are supposed to be after lag, for example.
    - The coordinates of other players, other NPCs, their numbers, etc.
    - Other related gameplay data needed, what damage you did, etc.

    In general a lot of stuff are calculated by the client to smooth things over visually, but nothing gameplay related is accepted unless the server confirms it with its internal simulation. It has the final say and it's the ultimate governor. Otherwise cheating would be straightforward.
    Thank you. Another question, what is the minimum amonut of distance coverable to change coordinate and having to send it? Like 0.01 yard? (not considering turning around)

  15. #15
    Quote Originally Posted by Ricirich91 View Post
    Is this correct?
    - your CPU calculates all the numbers coming from your actions
    - the calculated data is uploaded to server (continuously, splitted in packets of information)
    - nearby players download your data (continuously, splitted in packets of information)
    - you as-well, keep download the data of nearby players
    - all of this happens in a bunch of milliseconds

    Questions:
    - What is the frequency at which packets of information are sent to server?
    - What's the size of these packets?
    - Can ALU (CPU's arithmetical logical unit) lags in WoW sometimes? What happens?
    This is incorrect.

    The computations are done on the server, whatever the client does is only used to make the UI smoother, key numbers eventually get corrected with those sent by the server.

    - - - Updated - - -

    Quote Originally Posted by tobindax View Post
    In practice the absolute minimum is exchanged back and forth:

    OUT:
    - Your input (what keys you press) that's a very low amount of data
    - (Possibly) where you think you are, at what state you are. That might help smoothing things over after lag.

    IN:
    - Where you are supposed to be based on what you sent before. That info will teleport you back where you are supposed to be after lag, for example.
    - The coordinates of other players, other NPCs, their numbers, etc.
    - Other related gameplay data needed, what damage you did, etc.

    In general a lot of stuff are calculated by the client to smooth things over visually, but nothing gameplay related is accepted unless the server confirms it with its internal simulation. It has the final say and it's the ultimate governor. Otherwise cheating would be straightforward.
    The "out" is different - the client sends actions, not keys. It doesn't send any of its estimates regarding anything critical (almost everything is), that's a waste of time, because the server can't trust that info and would have to recompute it to recheck.

    The "in" is correct.

  16. #16
    Deleted
    Quote Originally Posted by rda View Post
    the client sends actions, not keys

    Yeah that was just a simplification for the ELI5. It doesn't care what keys are actually bound. It cares that a certain command is sent to the gameplay server.

    - - - Updated - - -

    Quote Originally Posted by Ricirich91 View Post
    what is the minimum amonut of distance coverable to change coordinate and having to send it? Like 0.01 yard? (not considering turning around)

    I doubt we can know that without the source code. Or some people could reverse engineer it somehow. Maybe by using artificial lag or something.
    Last edited by mmocdc260e8e2a; 2015-10-09 at 03:59 PM.

  17. #17
    Deleted
    Quote Originally Posted by Ricirich91 View Post
    Is this correct?
    - your CPU calculates all the numbers coming from your actions
    - the calculated data is uploaded to server (continuously, splitted in packets of information)
    - nearby players download your data (continuously, splitted in packets of information)
    - you as-well, keep download the data of nearby players
    - all of this happens in a bunch of milliseconds

    Questions:
    - What is the frequency at which packets of information are sent to server?
    - What's the size of these packets?
    - Can ALU (CPU's arithmetical logical unit) lags in WoW sometimes? What happens?
    Here's some code you can read and learn:
    https://github.com/ProjectSkyfire/SkyFire.548

  18. #18
    Easy to figure out, activate a Disconnect Script which will disconnect you from the server without kicking you out to the log in screen. Everything you can do in this offline-limbo state is what is calculated by your client. You can pretty much move/fly freely everywhere, but that's about all you can do.

    Things like no-fly zones, water fatigue, fall damage, are calculated by the server regarding movement. So is NPC data, as NPC's will not spawn in once you fly away far enough.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •