It’s been a while since I posted an update on Letter Miner. I’m currently working on adding Game Center support to LetterMiner. I never used Game Center before, let alone programmed for it, so it’s taking longer to release a new update.
I have created two Game Center leaderboards for LetterMiner. The first leaderboard stores the highest level the player has reached in the game. The second leaderboard stores the number of unique words the player has mined.
Coding leaderboard support was easier than I thought. Create a Game Center score for each leaderboard, report the score to Game Center, and present a view controller so the player can view the leaderboards.
Game Center achievements are much harder to code. As a test I decided to have three achievements: reaching Levels 2, 5, and 10. When clearing a level I would update the progress on the achievements. When clearing the first level, the progress on the first achievement was 100%, 25% on the second achievement, and 11% on the third. Each achievement has its own unique ID so it involves some nasty hard-coding of values.
Trying to get the achievements working showed me that I need to redesign the game code to better support Game Center achievements. I realized that in addition to the level clearing achievements, I wanted to have achievements for mining unique words, mining long words, and mining high scoring words. Supporting all these achievements is going to require more flexible code so I’m taking the time now to make my code more flexible.