Information about the Game network delay

Source: Internet
Author: User

Client-server

    1. The server takes snapshots of the "at a constant" and broadcasts these snapshots to the clients.
    2. Client, snapshot, server
    3. Server <-userinput <-Client
    4. Server runs a physical simulation step, checks the game rules, and updates all object states
    5. The client has to tell the server its incoming bandwidth capacity
    6. Server doesn ' t send a full world snapshot each time, but rather only changes, usually full (Non-delta) snapshots is only Sent when a game starts or a client suffers from heavy packet loss for a couple of seconds

Input Prediction

1.local client just predicts the results of its own user commands. 2.if Server Result! = client, then the client had to correct its own position, since the server have final authority over C Lient-side Prediction 3.Prediction is only possible for the local player and entities affected only by him

LAG compensation

1.The lag compensation system keeps a history of all recent player positions for one second. If A user command is executed, the server estimates at the time of the command was created as follows:

Command Execution time = current Server time-packet latency-client View interpolation

Then the server, moves all, and players-only Players-back to where they were at the command execution time. The user command is executed and the-the-detected correctly. After the user command had been processed, the players revert to their original positions.

End

Network latencies and lag compensation can create paradoxes that seem illogical compared to the real world. For the example, you can is hit by a attacker you can ' t even see anymore because you already took cover. What happened are that the server moved your player hitboxes back in time, where do you were still exposed to your attacker. This inconsistency problem can ' t is solved in general because of the relatively slow packet speeds. In the real world, you don ' t notice this problem because light (the packets) travels so fast and you and everybody around You sees the same world as it's right now.

Information about the Game network delay

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.