How to accurately synchronize player status between the game client and the server?

Source: Internet
Author: User

Welcome to Unity Learning, unity training, Unity Enterprise training and education zone, there are many Unity3d resources, unity3d training videos, unity3d tutorials, Unity3d FAQs, Unity3d Project source code, "Dog Planing Learning Network" Unity's Ultimate Academy, dedicated to building the industry Unity3d training, learning the first brand.
assume that the skill has a front shake, an attack, and a post-shake 3 stages.

The pre-shaking stage can be understood as the brewing before or a few spells, the attack phase can be understood as the beginning of the brandished cut to the target body this time period, the post-shaking stage can be understood as the resumption of attack posture stage.

our skill-calling system allows for the post-shake phase of certain skills (called skill a), when another skill (called Skill B) is used, ignoring the pre-shake phase of skill B, directly into the attack phase of skill B.

now that the player has used skill a, and has entered the post-shake stage of skill A, assuming that the post-shake stage of skill A is 500ms, the player uses skill B in order to ensure the game effect, and the skill performance is the client-first in the end of the post-shake phase of skill a. The client determines that the forward shake of skill B can be ignored to directly enter the attack phase of skill B, and the server receives a message using skill B, at which point it is very likely that the post-roll phase of skill A has ended, causing the server to start from the front-shaking phase of skill B. Therefore, the player will be able to use the skill, the client and the server to ignore whether the front shake is inconsistent, like the above situation, the client can obviously see the skill B cut in the target after a few minutes after the hit word, because the server calculates a forward shake time.

for this situation, I thought about a few ideas:

1: The post-roll stage time for the server to properly extend the skill
2: When a client sends a message using a skill to the server, sends it to the server with the ignore forward shake
For more information, please visit the "Dog Planing Learning Network" Unity Ultimate Academy

How to accurately synchronize player status between the game client and the server?

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.