开发者

iOS Game Center Peer to Peer using Game Kit

I would like some confirmation before looking into the APIs deeply. Does Game Center let developers build an app so users can connect and interact with each other seamlessly ?

I mean, if I wanted to build a simple game, like a multiplayer quizz. I want people to look for each other on game center, go to a "game room" and answer the same quizz questions, the fastest winnin开发者_开发问答g.

As a developer point of vue, what will be required to my app ? Do I have call back like

player:(Player *)player didSendData:(NSData *)data

so I can check who gets the good answer and broadcast a message to everyone (to update their screen)

I know I could RTFM, I just want to know if "yes" that's basically the goal, or "no" you won't be able to do that with game center.

Thanks !


The answer is, Yes, you can do that. You can use Game Center to connect users using Apple's matchmaking services. This allows you to send push notifications to other Game Center users to invite them to connect. There's also the underlying GameKit framework (which Game Center uses) that allows you to create an ad-hoc network between devices in proximity over BlueTooth or Wifi. You can also dive into a bit of hardcore C and use Bonjour to connect devices. I use both peer-to-peer and Game Center connectivity in my game Cee-lo.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜