Implementing iOS Achievements

MacMowl

  • Posts: 65
Hi,

I'm looking for the best way to implement Achievements for my game. I would like to show achievements at the Game Over scene and not during the game.

I found this on Tutsplus:

http://gamedev.tutsplus.com/tutorials/implementation/how-to-code-unlockable-achievements-for-your-game/

Is that a good way? Do you have another approach?

Thank you,

Macmowl

h1rnz1lla

  • *
  • Posts: 649
an achievement is nothing else than a value in an attribute. if you like to make an achievement, lets say, kill 100 enemys, you keep track of the total amount of killed enemys in a game attribute. when your game attribute reaches 100, you use the stencyl achievement-block to report the specific achievement as reached (gamecenter needs to be initialised already). then you can display you graphic/text in your game over scene.

the second thing you might need is a game attribute that keeps track of if the achievement has been reached already. because you don't want to have an achieved goal to pop up twice.

the third thing you need to be aware of, is that at the time when the user reaches the achievement he could be offline and therefore could have no gamecenter connection. to make sure he still get the achievement you can have a routine reporting to gamecenter every 10 game startups or so.

hope that helps to get you started and before you even start, read this nice article about what achievements should and shouldn't be:

http://www.gamasutra.com/view/feature/185436/an_alternative_to_achievements.php

MacMowl

  • Posts: 65
Thanks for the article, very interesting.