谷歌玩游戏服务,确定主机或服务器 [英] Google play game service ,determining a host or server

查看:188
本文介绍了谷歌玩游戏服务,确定主机或服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用谷歌玩游戏服务开发一款多人游戏。
在我的游戏中,我有一些游戏逻辑只能运行一个玩家套装,我预先致电主持人。
i想要确定创建房间的玩家的主人。

但是我看到房间创建者ID可以在不同的玩家中设置不同的单一游戏,并且每个都会在自动比赛游戏中作为创建者返回。



那么除了排序玩家列表并使用第一个参与者作为主持人之外,寻找主持人的理想方式是什么?

Google专门在 Google Play游戏:选择一个特定的用户,它解释了如何解决同意并为特定用户分配一个特殊的卷。总结:对参与者ID进行排序,并按排序顺序排序,随机选择主持人并将其广播给其他玩家。这可确保所有用户都同意主机,并且每次随机选择主机。

im trying to develop a multiplayer game using google play game service. In my game i have some game logic that will run only one players set ,which i prefr to call host. i would like to determine the host by player who created the room.

but i see room creator id can be different in different players set on a single game,and each returns as creator in auto match game.

so what should be the ideal way to find a host ,apart from sorting the player list and use the first participant as host ?

解决方案

Google provided a video specifically on Google Play Games: Choosing a specific user which explains how to work around agreeing and assigning a specific user a special roll. In summary: sort the participantIds and have the first by sorted order randomly choose the host and broadcast that to the other players. This ensures that all users agree on the host and the host is randomly chosen each time.

这篇关于谷歌玩游戏服务,确定主机或服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆