Connect players with same phone language settings

Posted by Abin George on Game Development See other posts from Game Development or by Abin George
Published on 2014-06-13T04:33:13Z Indexed on 2014/06/13 9:44 UTC
Read the original article Hit count: 231

Filed under:

I am working on a turn-based multiplayer game using game center. The game also use Spanish localisation. It is enabled by reading the device language settings. Now my requirement is: When i start a turn based match, my opponent should have the same language setting in his/her phone as I am having. How can I make this possible.

I use the following code to connect

- (void)findTurnBasedMatchWithViewcontroller:(UIViewController *)viewController forDelegate:(id)argDelegate {
self.delegate = argDelegate;
presentingViewController = viewController;
GKMatchRequest *request = [[GKMatchRequest alloc] init];
request.minPlayers = 2;
request.maxPlayers = 2;
[manager setCurrentGameType:kTurnBased];
GKTurnBasedMatchmakerViewController *mmvc = [[GKTurnBasedMatchmakerViewController alloc] initWithMatchRequest:request];
mmvc.turnBasedMatchmakerDelegate = self;
mmvc.showExistingMatches = NO;
[presentingViewController presentViewController:mmvc animated:YES completion:^(void) {

 }];
}

© Game Development or respective owner

Related posts about ios