Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing Multiplayer Game Center game

I've read varying/conflicting answers, and I need some definite answers.

I'm currently at the start of developing a turn-based multiplayer game with Game Center. I've been following a tutorial @rayWenderlich.com, and I've got the player being authenticated in the simulator and the match making viewController popping up, but that's as far as I've got.

So first question is,

  1. Is it possible for my code (via the simulator), and my iPhone to connect/match/find each other?
    • I've read that this is not possible, but I'm sure I saw a Youtube video of a guy that got both of them communicating
  2. What aspects of turn-based Game Center functionality can you test with just the simulator and 1 device?

Update:

I wasn't imagining things, after a bit of searching, I found that Youtube video.

Maybe it's something different, but it seems to be possible to match/play from the simulator to an iOSDevice and back again. How is that compared to what people say you can't do on here?

like image 258
Phil Avatar asked Sep 27 '12 15:09

Phil


People also ask

How do you challenge a friend on Game Center?

Or, tap any player you see anywhere in Game Center. Challenge someone to outdo you. Tap one of your scores or achievements, then tap Challenge Friends.


2 Answers

I have recently made a turn based application for iPhone and i used my iPhone and the simulator on my computer to test it out and it work just fine. There are one thing you should keep in mind and that is that you have to use different accounts for GC on your iPhone and the simulator.

I am not quite sure what you mean with question two but you can use all the hardware functions that the simulator offers even when you are playing online. keep in mind that you can't test the multiplayer part of your program on just the simulator, it has to be between at least tested with one device and the simulator.

like image 69
Simon Nilsson Avatar answered Nov 15 '22 15:11

Simon Nilsson


The only difference between testing on simulator and physical device is GKTurnBasedEventHandler doesn't work on the simulator. So these methods won't be called on iOS Simulator :

-(void)handleInviteFromGameCenter:(NSArray *)playersToInvite
-(void)handleMatchEnded:(GKTurnBasedMatch *)match
-(void) handleTurnEventForMatch:(GKTurnBasedMatch *)match didBecomeActive: (BOOL)didBecomeActive

While using an iOS Simulator and a Device for testing, those methods will be called on device but not in simulator. So it will very hard to develop.

like image 30
Salih Ozdemir Avatar answered Nov 15 '22 15:11

Salih Ozdemir