I'm planning to do a game with the following menu system in Apple Game Center:
main menu --> on device, user vs AI
|
-> on device, user vs another user
|
-> game center match, user vs another user
This is my current sketch for implementing the authentication procedure:
-
Authenticate upon launch, but don't ask for credentials if the local player is not authenticated.
-
Ask for credentials if the local player is not autenticated when the GameCenterMatch button in the main menu is pressed.
-
Inform the user that he needs to authenticate via the GameCenter app if he pushes the GameCenterMatch button when max num authentication tries have passed or when Game Center is inactivated from the Game Center app.
-
Store local player in a global Authenticator object at the start of each game center match.
At authentication triggered by iOS: Invalidate match if Authenticator has a player for a current match, and that the new local player is not the same. This swap must have happened via the GameCenter app, when the game was swapped out during a match.
-
Different players can play on the same device. Player A shall not see player B's game center matches, but on device matches shall be seen by both.
Questions:
-
Will this authentication scheme cover all corner cases? I.e. when the app is started by pushing a notification etc.
-
What do you think about 3? I'm not even sure that it's ok by Apple to give feedback upon a failed authentication. My fear is that iOS won't even launch a dialog, and that the user don't know that he needs to authenticate in the Game Center app.
-
4 is a bit complex, and I guess it won't happen that often. But I guess you have to do something like that?
-
Any other improvements or suggestions are most welcome!