当前位置:网站首页>[Huawei online battle service] how can new players make up frames when the client quits reconnection or enters the game halfway?
[Huawei online battle service] how can new players make up frames when the client quits reconnection or enters the game halfway?
2022-07-26 14:59:00 【Huawei Developer Forum】
The problem background
Use frame synchronization to realize multiplayer online games , Framing is an inextricable topic . Conventional weak net complementary frame ,SDK Automatic frame filling has been realized , Games can be ignored . For scenes where the client is shut down for a long time and re enters the room or players join in the middle of the game , New players play online SDK The default is to supplement the frame from the first frame of the game , The online game server will not cache all the supplementary frame data, which is usually cached 5 Minute history frame data , At this time, simply rely on SDK Automatic frame filling will fail . How to solve this problem , Here's a way of thinking .
Solution
Specify the owner of the house or a player in the room in the game , Regularly save the data status that needs to be synchronized in the current game ( For example, refresh every minute , The refresh cycle should be less than five minutes ), And record the current frame id, Then synchronize the data to other players in the room through certain means ( For example, by modifying room properties , Save it in room properties ), When new players join the room, they can go from room Get the room property in the instance , Then analyze the last room state data recorded therein , Get status data and frames id data .
At this time, only based on the room status data , Supplemented by slave frames id+1 After that, the synchronization of room data can be realized by supplementing frames .
How to specify from a id Start framing ? Two scenarios :
Enabled SDK Auto framing scene , call SDK Reset the start of complementary frame provided id Interface .

closed SDK Auto framing scene , call SDK Manual frame filling interface provided .

Get it done !
Official information : Huawei online battle service
边栏推荐
- Use of delve for go development and debugging
- Leetcode summary
- 下一代视觉Transformer:解锁CNN和Transformer正确结合方法
- Pdf translation, which translation company in Beijing is good
- 【文件上传漏洞-06】分布式配置文件攻击实验—以upload-labs-4为例
- C winfrom common function integration
- [file upload vulnerability-06] distributed configuration file attack experiment - take upload-labs-4 as an example
- go开发调试之Delve的使用
- Transc knowledge representation model
- [2022 national game simulation] Bai Loujian - Sam, rollback Mo team, second offline
猜你喜欢

Win11 running virtual machine crashed? Solution to crash of VMware virtual machine running in win11

AMB | 迈向可持续农业:根际微生物工程

VP video structured framework

哪里有写毕业论文需要的外文文献?

Summary of target tracking related knowledge

CVE-2022-33891漏洞复现

Create Yum warehouse inside the enterprise

目标跟踪相关知识总结

SP export map to Maya

NLP之NER:商品标题属性识别探索与实践
随机推荐
Establishment of SSO single sign on environment based on CAS
Leetcode summary
C语言入门必刷100题合集之每日一题(1-20)
Advanced Qt development: how to fit the window width and height when displaying (fitwidth+fitheight)
How to get 5L water in a full 10L container, 7L or 4L empty container
sqlDeveloper工具快速入门
C# NanUI 相关功能整合
一个满的10L容器,7L、4L空的容器,如何得到5L的水
Matlab solution of [analysis of variance]
JS analog clock with text label
The leader took credit for it. I changed the variable name and laid him off
2. 两数相加
Postman environment variable setting code storage
JS to realize the number to amount price thousand separator
【方差分析】之matlab求解
Sqldeveloper tools quick start
Lean product development: principles, methods and Implementation
Pdf translation, which translation company in Beijing is good
BSN IPFs (interstellar file system) private network introduction, functions, architecture and characteristics, access instructions
Kubernetes ---- pod configuration resource quota