Blog

Game Center

by Anders Kierulf

2016-10-31

SmartOthello as released mid-August:

And here’s SmartOthello mid-October:

The layout of the app was designed with profile pictures in mind. These player avatars disappeared when iOS 10 was released: Game Center leaderboards show boring gray circles, GKPlayer.loadPhoto returns nil.

Some bug reports and a Technical Support Incident later, this appears to be Apple’s intended behavior, not just a glitch. This behavior is so wrong and unlike Game Center that I think Apple will eventually backtrack, but waiting and hoping is not an option: I could not leave SmartOthello in that broken state. The newest version adds the ability to set your own profile picture and uses CloudKit to share these between players.

Matchmaking with iMessage

At WWDC in June, Apple announced that the Game Center app was going away, but not to worry, the Game Center functions were all still going to be there. Player invites would be using the newly improved iMessage; no code change needed. (Sure.)

That may have been true for the simplest matchmaking scenarios, but not for SmartOthello. I’m allowing players to set their color preference to black, white, or neutral, and their opening preference to regular or random. To start a game, I thus need that information from both players. (If they both prefer the same color, color choice will be random; random opening will only be applied if both players agree.) This added negotiation step needed extra work in iOS 10.

Starting a game over iMessage is cumbersome, adding several extra taps to specify opponent and start the game, as well as context switches. Apple has work left to do there. In particular, there needs to be a way to bypass the confusing auto-match screen.

Why no profile pictures?

My guess is that the missing profile pictures are related to using iMessage for matchmaking. Many iMessage users have images associated with them, but those are through the user’s contacts. There’s no way to map Game Center players to contacts, and for privacy reasons, it’s obvious that Apple won’t make those images available through Game Center.

It would be easy for Apple to add back a profile picture in Settings > Game Center. However, when starting a match through iMessage, that opponent would then have two images: one from Game Center and one from iMessage. It’s a mess, and that may be why the Game Center images were removed. Apple dug this hole for themselves; I hope they can dig their way back out.

Game Center in SmartGo

One of my goals with SmartOthello was to learn Swift (which worked out perfectly) as well as gain experience with technologies like Game Center and iCloud before including them in SmartGo. My experience with Game Center has not been good (poor and outdated documentation, APIs not working as advertised, no way to avoid polling for invites), and Apple doesn’t seem to be paying a lot of attention to the future of Game Center. Removing the avatars was a poor decision, and matchmaking using iMessage needs a lot of work.

At least I know to steer clear of Game Center for SmartGo.