Wordsum Blitz coming to Google Play

The first game I released after 10 years of failed projects was Wordsum. I was proud of this game, but during development, I let buzz words like IAP and CPI’s cloud my judgment. The result was a game I was proud of but felt wasn’t quite right. I started to make a follow-up game called Wordsum Blitz that would realize my vision.

Wordsum Blitz was released on iOS, but I never ported it to Google Play. The original Wordsum is still being download and played 3 years after it’s release, so I thought it was time to bring Wordsum Blitz to Google Play. Look for Wordsum Blitz on Google Play on April 23rd!

Wordsum Blitz is out!

It’s finally time to for you all to play Wordsum Blitz. I’m really proud of how this game turned out so please check it out and let me know what you think. Love it or hate it, I always appreciate feedback.

Confusion with Unity Social API

I’ve been working on integrating features like a leaderboard and achievements into Wordsum. Instead of building my own systems or using third party services, I decided to use native services like Game Center for iOS and Google Play Services for Android. Unity provides a nice abstraction for these layers in the form of the Social (http://docs.unity3d.com/ScriptReference/Social.html) API. The main purpose of this post isn’t for me to talk about how great the Social API is but to share a misunderstanding I had with it’s implementation.

After integrating Game Center into my game, I noticed some weird behavior. When I suspended the game and resumed on iOS the game would go back to the main menu. After much debugging I realized two things were happening.

Game Center re-authenticates on resume

If the users suspends your game and then loads the game from the multitasking tray, Game Center re-authenticates. This would be find if the following wasn’t true.

Callback provided when authenticating is resused

When you authenticate with Game Center you call the following:

Social.localUser.Authenticate(success => {
 //Doing some stuff
 Application.LoadLevel("MainMenu");
});

You provide a callback you want to invoke after the user has authenticates. I’m my case, I was attempting to load the Main Menu scene. The idea was to wait until the player authenticated or did not to load the main menu. This didn’t work so when when the player resumed their game, authenticated automatically and loaded the main menu. Once I changed this my problem disappeared.

Summary

My writeup isn’t meant to discourage you from using the Social API. It provides a great abstracted layer to work with. Unfortunately for me, I assumed that the callback I provided was going to be used once and then discarded. In my opinion, using C# Delegates would have been a clearer choice to store an action to run every time a player authenticates.