用户失去连接时的 Firebase 服务器端逻辑
Firebase server-side logic when a user loses their connection
快速提问。我正在使用 Firebase 制作多人 iOS 游戏。如果用户正在参与游戏,突然他们的 iPhone 崩溃或互联网中断数小时或死机,我希望将他们从游戏中移除,因为他们无法再玩了。如果 phone 已经死了,无法告诉 Firebase 将用户从游戏中移除,我可以在服务器端设置一些东西来检查玩家是否在较长时间内不再发送数据,然后将其移除他们来自游戏?玩家不断更新实时数据库是这款游戏的本质,因此密切关注谁没有更新他们的数据将是判断某人 phone 是否刚从悬崖上掉下来的简单方法。
我想玩家A可以检查玩家B是否不再更新游戏数据并将其从游戏中移除,但如果玩家A和玩家B都phone同时着火时间,同行检查不再有效。
If the phone, being dead, cannot tell firebase to remove the user from the game, is there something I can setup server-side to check if a player is no longer sending data for an extended period of time and then remove them from the game?
勾选这个 Detect if Firebase connection is lost/regained post. I think the link there is directing towards the legacy and this is the new link 对应项。
..if both Player A and Player B have their phones burst into flames at the same time, that peer-checking no longer works.
你不应该创建一个像 Room 这样的东西吗?玩家列表会进入并使用上面提到的 [=19] 检查当前剩余玩家的数量=]?
快速提问。我正在使用 Firebase 制作多人 iOS 游戏。如果用户正在参与游戏,突然他们的 iPhone 崩溃或互联网中断数小时或死机,我希望将他们从游戏中移除,因为他们无法再玩了。如果 phone 已经死了,无法告诉 Firebase 将用户从游戏中移除,我可以在服务器端设置一些东西来检查玩家是否在较长时间内不再发送数据,然后将其移除他们来自游戏?玩家不断更新实时数据库是这款游戏的本质,因此密切关注谁没有更新他们的数据将是判断某人 phone 是否刚从悬崖上掉下来的简单方法。
我想玩家A可以检查玩家B是否不再更新游戏数据并将其从游戏中移除,但如果玩家A和玩家B都phone同时着火时间,同行检查不再有效。
If the phone, being dead, cannot tell firebase to remove the user from the game, is there something I can setup server-side to check if a player is no longer sending data for an extended period of time and then remove them from the game?
勾选这个 Detect if Firebase connection is lost/regained post. I think the link there is directing towards the legacy and this is the new link 对应项。
..if both Player A and Player B have their phones burst into flames at the same time, that peer-checking no longer works.
你不应该创建一个像 Room 这样的东西吗?玩家列表会进入并使用上面提到的 [=19] 检查当前剩余玩家的数量=]?