Reputation: 3045
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,
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?
Upvotes: 16
Views: 3169
Reputation: 258
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.
Upvotes: 5
Reputation: 966
You can use the simulator if you are using "Auto Match". However, in my limited experience, there are some bugs that can present themselves on actual devices that you couldn't see before. For instance, if you have poorly written code that ends up depending on the processing speed of the device in order to execute correctly.
Upvotes: 0
Reputation: 1297
Yes you can match games between the simulator and the device, I have been able to do it before, just keep in mind that you have to use two different Apple/GameCenter accounts.
As per the turn-based aspects, what are you looking for, as far as I've seen, on the simulator you can test anything you can on the device in terms of Game Center, so I guess it will depend on your backend.
Upvotes: 0
Reputation: 173
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.
Upvotes: 6