Giter VIP home page Giter VIP logo

netcode-fps's Introduction

NetCode-FPS

Bilibli 车辆同步演示视频
Bilibli FPS同步演示视频

特点:

  • 客户端玩家预测
  • 客户端远程玩家插值
  • 回滚和重播
  • 实时调整客户端对于服务端Tick的预测,以优化服务端的输入Buffer

参考:

运行Demo

说明

Unity版本:2020.1.17f1c1
整个工程全部用DOTS以及混合GameObject开发。

注:请使用同版本UnityEditor打开工程

两个示例场景:

  1. Scene/NetCube
  2. Scene/NetFPS

打开场景Editor下直接Play即可

NetCube示例的操作

  1. WASD移动
  2. Space向上施加力
  3. 鼠标左键重置服务端Cube位置,以测试客户端与服务端位置不一致时的拉扯的效果.

NetFPS示例的操作

  1. WASD移动
  2. Space跳跃
  3. 鼠标左键开火
  4. Left Shift加速
  5. R手雷
  6. T重置服务端Playe位置,以测试客户端与服务端位置不一致时的拉扯的效果.
  7. F12锁定鼠标
  8. Esc释放锁定的鼠标
  9. 玩家被击中时,当血量等于0时,在服务端会把玩家的位置重置。

Build

Assets下有两个Build配置:

  1. WindowsClassicBuildConfiguration 构建客户端
  2. WindowsClassicBuildConfigurationSev 构建服务端

构建完成后即可在NetCode-FPS/Build中找到Ser服务端以及Test客户端

netcode-fps's People

Contributors

yinmany 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.