简体   繁体   English

如何在使用Google Play游戏服务的实时多人游戏中使用僵尸玩家?

[英]How can I use bot players in real-time multiplayer games using Google Play game services?

I'm working on a new multiplayer game for Android devices and we are planning on using GPGS to handle our lobby/ gameplay. 我正在为Android设备开发一款新的多人游戏,我们正计划使用GPGS来处理我们的大厅/游戏。 We need to fake it until we make it and have enough users to bring the matchmaking queue down to a reasonable wait. 我们需要伪造它直到我们制作它并且有足够的用户将匹配队列排到合理的等待。

Is it possible to have bot users that work with GPGS? 是否可以让机器人用户使用GPGS? Is it possible to extend the matchmaking functionality to include this? 是否可以扩展匹配功能以包含此功能?

You can implement bots at the game level. 您可以在游戏级别实现机器人。 You can't emulate a match participant at the GPGS level, but it's pretty straightforward to do that from the game's layer. 您无法在GPGS级别模拟匹配参与者,但从游戏层开始这样做非常简单。 What you would do is something like this: 你会做的是这样的:

  1. Start automatch, wait for players, start a timeout. 开始自动匹配,等待玩家,开始超时。
  2. When the timeout expires, see how many bots you need (say, N bots) 超时到期时,查看您需要多少机器人(例如, N机器人)
  3. Decide who what clients will control each bot (one useful rule might be sorting the clients by participant ID in ascending order, and having the top N control one bot each. 确定哪些客户端将控制每个机器人(一个有用的规则可能是按参与者ID按升序排序客户端,并且前N个控制每个机器人一个机器人。
  4. Play the game. 玩游戏。 Whenever you send an update about a character in the game, the sending participant specifies (in the message) whether that update is for the player or for the bot. 每当您发送有关游戏中角色的更新时,发送参与者指定(在消息中)该更新是针对玩家还是针对机器人。

So, as far as GPGS is concerned, you only have human players, but in your game's logic, there are N bots as well as players in the game. 因此,就GPGS而言,你只有人类玩家,但在你的游戏逻辑中,游戏中有N个机器人和玩家。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google Play 游戏服务实时多人游戏 - Google Play Games Services Real Time Multiplayer 如何使用Google Play游戏在实时多人游戏中处理应用版本? - How to handle app versions in real-time multiplayer using Google Play Games? 如何在实时多人Google Play游戏服务中创建房间时向其他参与者发送数据 - How to send data to other participant on Room creation in Real-time Multiplayer Google Play Game Services 如果Google Play游戏服务提供实时多人游戏,那么使用gamesparks.com有什么优势? 两者有什么区别? - If Google Play Games Services offer Real-time Multiplayer, what is the advantage of using gamesparks.com? What is the difference between these two? 当应用程序进入后台时,实时多人游戏Google Play游戏服务同行会断开连接 - Real-time Multiplayer Google Play Games Services peer gets disconnected when app goes in background 如何检测客户是否故意在Google Play游戏实时多人游戏中留下房间? - How to detect if client intentionally left Room in Google Play Games Real-time Multiplayer? Google玩实时多人并发-有时玩家会在同一时间选择正确的答案 - Google play real-time multiplayer concurrency - sometimes players pick the right answer at the same time 如何在Google Play游戏实时多人游戏中定义主机? - How to define a host in google play games real time multiplayer? 如何使用Facebook好友制作Android多人游戏? (Google Play游戏服务仅使用G +) - How to make Android Multiplayer Games using Facebook friends? (Google Play Game Services uses G+ only) 我可以使用Google Play游戏服务 - Unity Android免费实时多人游戏吗? - Can I use Google Play Games Services - Realtime Multiplayer in Unity Android Free?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM