简体   繁体   English

对等网络iOS 7

[英]peer-to-peer Networking iOS 7

I am new to networking over iOS and i am having a lot of difficulty in finding a good tutorial to learn about it. 我不熟悉通过iOS进行联网,并且在寻找好的教程方面遇到很多困难。 I am making a game and implemented it for a single player but now i have to make it multiplayer. 我正在制作游戏并为单个玩家实现,但现在我必须将其制作为多人游戏。 What i have to do on server is only comparing the final score of the two players playing the game and display the message that who won the game. 我在服务器上要做的只是比较两个玩游戏的玩家的最终得分,并显示谁赢得了游戏的消息。 There are no asynchronous calls required the final score is only needed when the timer ends and reach 0. Please help me with for a kick start, really need it. 不需要异步调用,只有在计时器结束并达到0时才需要最终得分。请真正帮助我开始踢球。 I have been scratching my head over bonjour but unable to understand it as i am very new to networking. 我一直在为bonjour挠头,但由于我是网络新手,所以无法理解它。

Multipeer Connectivity will work if all players are in close proximity or on the same network. 如果所有播放器都靠近或在同一网络上,则多点连接将起作用。 However since you did not specify that those conditions would necessarily be met, you probably want to look at the Game Center networking functionality at https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/Matchmaking/Matchmaking.html 但是,由于您未指定必须满足这些条件,因此您可能希望查看https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/Matchmaking/上的Game Center网络功能。 Matchmaking.html

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM