We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为什么要限制玩家在一帧中只能输入一次操作,看其他帧同步项目,基本没有这个限制。 func (l *lockstep) pushCmd(cmd *pb.InputData) bool { ... //检查是否同一帧发来两次操作 for _, v := range f.cmds { if v.Id == cmd.Id { return false } } ...
func (l *lockstep) pushCmd(cmd *pb.InputData) bool { ... //检查是否同一帧发来两次操作 for _, v := range f.cmds { if v.Id == cmd.Id { return false } } ...
空帧为什么不马上广播,客户端是需要空帧来驱动前进的。 我看你提供的客户端在没有输入的逻辑帧时,自动currentFrameIdx++了,是不是不够严谨了,正式项目肯定是不能丢帧的。 if !g.dirty && framesCount-g.clientFrameCount < BroadcastOffsetFrames { return }
if !g.dirty && framesCount-g.clientFrameCount < BroadcastOffsetFrames { return }
The text was updated successfully, but these errors were encountered:
我们游戏技能是带CD的,玩家不可能一帧释放多个技能 这个可根据策划需求
Sorry, something went wrong.
No branches or pull requests
为什么要限制玩家在一帧中只能输入一次操作,看其他帧同步项目,基本没有这个限制。
func (l *lockstep) pushCmd(cmd *pb.InputData) bool { ... //检查是否同一帧发来两次操作 for _, v := range f.cmds { if v.Id == cmd.Id { return false } } ...
空帧为什么不马上广播,客户端是需要空帧来驱动前进的。
我看你提供的客户端在没有输入的逻辑帧时,自动currentFrameIdx++了,是不是不够严谨了,正式项目肯定是不能丢帧的。
if !g.dirty && framesCount-g.clientFrameCount < BroadcastOffsetFrames { return }
The text was updated successfully, but these errors were encountered: