开发者

GKPeerStateAvailable for non existing peers?

used this 开发者_开发百科website for the long time to find answers, now need to ask on myself! :)

I have implemented multi player for my game using GKSession and client/server approach, not using peer picker (up to 4 player allowed).

I have one big problem which I can't find solution for.

If you disconnect/reconnect server peer quickly enough, client peer will "remember" that host and will show it in the list of all available peers permanently, only turning wifi/bluetooth off resets this.

So if I do this 5 times in a row, my client will show 5 available hosts with the same name!

Anyone had experience with this? Any idea of workarounds?

I should note that requirements for my game is iPhone SDK 3.0 for Bluetooth and 3.1 for Wifi as GKSession supports both now.


I have a similar problem. In fact I event get peers listed who are not even currently playing the game. Even more so, peers who are not acting as server are listed. I am wondering if there is some behind the scenes caching going on.

I'm thinking about implementing some kind of timer with visual feedback to show the disconnect progress, ideally to prevent this situation. It seems like in general there is a bit of time delay involved with connecting/available and disconnecting/unavailable. It might be better to code the interface to take these time delays into consideration, though I'm not sure exactly how.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜