Giter Site home page Giter Site logo

groundzerostudio / netstatesync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chosen-gjh/netstatesync

0.0 0.0 0.0 125.62 MB

网络状态同步Demo Server AND Client

C# 99.65% Objective-C++ 0.06% C++ 0.12% CMake 0.01% ShaderLab 0.05% HLSL 0.05% GAP 0.06%

netstatesync's Introduction

NetStateSync

Server AND Client

网络状态同步Demo图文详解

同步的三类

帧同步 快照同步 网络同步
优点 减轻服务器压力,精确度高。 最易防外挂 实时性强,要求双端模拟
缺点 重连时间长,容易不同步,不能用浮点数计算 数据包较大,网络波动影响大,无法实时同步 难实现

简单实现一个网络状态同步Demo

我理解的游戏中的广义的网络状态同步:

  • 服务器端为唯一计算标准。
  • 客户端在状态改变时需要与服务器校准各属性。
  • 可双端模拟,但以服务器为主,客户端为辅。 image

因为长时间工作在前端,后端代码已经不熟练了,并且此次Demo服务器需要跑物理运算,故此次将服务器是用Unity编写。

bandicam.2022-06-22.23-07-53-245.mp4

多端

bandicam.2022-06-22.23-21-18-533.mp4

netstatesync's People

Contributors

chosen-gjh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.