当前位置:网站首页>[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
边栏推荐
- 益方生物上市首日跌16%:公司市值88亿 高瓴与礼来是股东
- Wechat applet - "do you really understand the use of applet components?
- Advanced MySQL v. InnoDB data storage structure
- 次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
- 外文文献查找技巧方法有哪些
- 最详细的专利申请教程,教你如何申请专利
- Network pictures are transferred locally, causing the kernel to exit
- AMB | 迈向可持续农业:根际微生物工程
- Figure introduction to neural network core dataset
- As the "first city" in Central China, Changsha's "talent attraction" has changed from competition to leadership
猜你喜欢

双屏协作效率翻倍 灵耀X双屏Pro引领双屏科技新潮流

数据权限就该这么设计,yyyds!

晶品特装递交注册:第一季营收降80% 陈波控制68.5%股权

CAS单点登录

领导抢功劳,我改个变量名让他下岗了

Classic line style login interface

RPN:Region Proposal Networks (区域候选网络)

Advanced MySQL v. InnoDB data storage structure
![[1.2. return and risk of investment]](/img/61/0135c429225e1c18705749a20e2a96.png)
[1.2. return and risk of investment]

31. Opinion-based Relational Pivoting forCross-domain Aspect Term Extraction 阅读笔记
随机推荐
CVE-2022-33891 Apache spark shell 命令注入漏洞复现
C common function integration
SharkTeam发布2022年第二季度Web3安全态势感知报告
SA Siam: Twin network for real-time target tracking
VP video structured framework
WPF common function integration
Okaleido tiger is about to log in to binance NFT in the second round, which has aroused heated discussion in the community
Matlab solution of [analysis of variance]
晶品特装递交注册:第一季营收降80% 陈波控制68.5%股权
VBA upload pictures
BSN IPFs (interstellar file system) private network introduction, functions, architecture and characteristics, access instructions
Advanced MySQL v. InnoDB data storage structure
Pdf translation, which translation company in Beijing is good
JS creative range select drag and drop plug-ins
Transc knowledge representation model
Lingo软件的使用
Crystal special decoration submitted for registration: the first quarter revenue fell by 80%, and Chen Bo controlled 68.5% of the equity
php反序列化部分学习
Error reported by Nacos enabled client
精益产品开发:原则、方法与实施