Skip to content

一个非常简单的用ECS+PB+KCP实现的帧同步Demo,支持多客户端和服务器通信。

Notifications You must be signed in to change notification settings

husheng0/LockStepSimpleDemo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

LockStepSimpleDemo

一个简单的帧同步Demo,使用的库有:ECS实体组件系统、ProtocolBuffer、KCP可靠UDP库、Fix64定点数库,支持多客户端和服务器通信。

Assets\StreamingAssets\config.txt文件字段说明

  • ServerAddress远程服务器ip
  • IsServer是否是服务器
  • PlayerId玩家id

以2个客户端连接一个服务器为例:
客户端1的配置为{"ServerAddress":"10.10.11.64", "IsServer":false, "PlayerId":1}
客户端2的配置为{"ServerAddress":"10.10.11.64", "IsServer":false, "PlayerId":2}
服务器的配置为{"IsServer":true}

About

一个非常简单的用ECS+PB+KCP实现的帧同步Demo,支持多客户端和服务器通信。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%