🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Is this a good GameCenter authentication pattern?

Started by
2 comments, last by Blixt Gordon 9 years, 3 months ago

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:

  1. Authenticate upon launch, but don't ask for credentials if the local player is not authenticated.

  2. Ask for credentials if the local player is not autenticated when the GameCenterMatch button in the main menu is pressed.

  3. 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.

  4. 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.

  5. 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!

Advertisement
You could build a simple game (like tic-tac-toe or rock-paper-scissors) and implement this logic, and push it through the app store if you want to see what the behavior is :-)
enum Bool { True, False, FileNotFound };

You could build a game server independently not dependent the game center of apple store.

there are many other reasons to require you to use your own server.

for example, to support the android game, or adjust different rewards by people'rank when u dont want to recompile the application.

https://github.com/ketoo/NoahGameFrame [A fast, scalable, distributed game server framework for C++]

Thanks for the indie server tip, kytoo! I've got one now :) As you say, it's good to be able to tune the ranking groups etc without modifying the apps.

This topic is closed to new replies.

Advertisement