当前位置:网站首页>华为联机对战如何提升玩家匹配成功几率
华为联机对战如何提升玩家匹配成功几率
2022-07-05 21:38:00 【华为开发者论坛】
背景
我们在进行玩家匹配时,难免因为游戏在线玩家人数少或玩家属性差异大不符合匹配条件等原因,导致玩家匹配不到合适的对手。这时候如何才能增加玩家匹配成功几率呢?
解决方案
方法一:优化匹配规则
华为联机对战服务配置匹配规则时,允许配置放宽属性。什么意思呢? 当某个匹配规则中属性区间内无法匹配到在线玩家,此时还有属性差异较大的在线玩家可以进行匹配时,可以配置放宽属性区间和放宽属性时长。当超过放宽条件匹配时长时,即触发放宽属性区间,也就是玩家可以再更大属性区间进行匹配,以达到增加匹配成功几率。 这种方式可以比较好的兼顾玩家公平性和游戏可玩性。 
方法二:机器人填充
如果以上方式,还无法达到效果,玩家匹配时仍然有较大概率无法匹配到在线玩家,可以考虑开通填充功能。 开通方法:在进行匹配规则配置时,将“机器人填充”选项,选择开启即可。开通服务后,玩家匹配到的整体超时时间时,仍然无法匹配到真实玩家,则系统会根据玩家信息进行计算,返回符合玩家能力范围的机器人玩家,机器人玩家信息包含匹配规则中配置的所有玩家属性信息,开发者可以根据属性值进行机器人能力构造。
功能开通很简单,重要的是游戏如何使用。
如上截图,开通机器人填充后,玩家总是能够匹配成功的,开发者需要根据匹配成功返回的room实例获取房间内玩家列表,解析玩家isRobot属性,如果该值为1表示该玩家为机器人玩家,如果该值为0,表示为真实玩家。开发者根据如上属性判断是否触发游戏本地机器人逻辑。
不同客户端之间机器人操作如何同步呢?
华为联机对战服务提供了伪随机数生成器,开发者可根据根据该方法进行不同端的随机数生成。参考文档:https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/gameobe-randomnumber-js-0000001250978031
边栏推荐
- 资深电感厂家告诉你电感什么情况会有噪音电感噪音是比较常见的一种电感故障情况,如果使用的电感出现了噪音大家也不用着急,只需要准确查找分析出什么何原因,其实还是有具体的方法来解决的。作为一家拥有18年品牌
- Feng Tang's "spring breeze is not as good as you" digital collection, logged into xirang on July 8!
- 让开发效率飞速提升的跨端方案
- Recursive query of multi-level menu data
- 有些事情让感情无处安放
- Why can't Chinese software companies produce products? Abandon the Internet after 00; Open source high-performance API gateway component of station B | weekly email exclusive to VIP members of Menon w
- Uni app Bluetooth communication
- Teach yourself to train pytorch model to Caffe (I)
- How to prepare for the algorithm interview and answer the algorithm interview questions
- 第05章_存储引擎
猜你喜欢

Simple interest mode - evil Chinese style

MySQL InnoDB Architecture Principle

递归查询多级菜单数据

DBeaver同时执行多条insert into报错处理

Cold violence -- another perspective of objective function setting

力扣------经营摩天轮的最大利润

2.2.3 output of documents

xlrd常见操作

Scenario interview: ten questions and ten answers about distributed locks

Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
随机推荐
Why can't Chinese software companies produce products? Abandon the Internet after 00; Open source high-performance API gateway component of station B | weekly email exclusive to VIP members of Menon w
Objects in the list, sorted by a field
EN 438-7 laminated sheet products for building covering decoration - CE certification
Robot framework setting variables
深信服X计划-网络协议基础 DNS
ESP32
DBeaver同时执行多条insert into报错处理
postgres 建立连接并删除记录
Pytoch practice -- MNIST dataset handwritten digit recognition
matlab绘制hsv色轮图
PostGIS installation geographic information extension
Clickhouse copy paste multi line SQL statement error
int GetMonth( ) const throw( ); What does throw () mean?
冯唐“春风十里不如你”数字藏品,7月8日登录希壤!
Sequence alignment
[case] Application of element display and hiding -- element mask
张丽俊:穿透不确定性要靠四个“不变”
Zhang Lijun: la pénétration de l’incertitude dépend de quatre « invariants»
[case] Application of positioning - Taobao rotation map
ESP32