Tuesday, August 20, 2013

GameCenter 30%

Well I worked hard last night on trying to get my GameCenter stuff sorted out, as I changed my implementation to a nice class. The only issue is that it didn't work properly. Oddly enough It would say I am not authenticated (a Bool), but I would see it tell me welcome at the top of the screen, Grrr.

I could not see why my App was not working and after a hour or more of creating special debugging versions I could see that my Bool was simply not altering when the callback said I was authenticated. I had it as a static in the header, and I did this as I thought that the callback being static this would be a good match.. Yeah, no more thought than that to be honest.

Well once I proved this was the issue I removed the static and declared it as a Global (I wanted this one as a global anyways). Then it all worked. I was now happy and felt I was at 30% through my leaderboard and GameCenter implementation.

In fact I was more than that, as I was able within an hour to create a Leaderboard button on my title page and allow that to bring up the GameCenter GUI and show my leaderboard, which I had placed a score from my game over situation for testing purposes. This mean't I was suddenly at about 75% implemented. WOWZA!

So tonight I have setup a few more leaderboards so I can try and record single level scores. I also created a couple of Achievements.. and I will try to implement them after I have worked on the individual level scores.

The only failure of the night consists of my son not being able to sign into the sandbox GameCenter to get another score in it to go with mine. Still I can work on that more tomorrow when I have more time.

So far it has all been pretty great apart from the stupid static variable. I would add though that I think Apple could add a feature on their web site to allow me to create a whole range of Leaderboards in one fell swoop. After all I may have 100 levels... eek.

Da Voodoochief

No comments:

Post a Comment