Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualjbadams

Posted 06 August 2012 - 09:07 PM

Yep, you're on the right track: all you need to do is keep track of any statistic (kills, doors opened, times the player has jumped, fastest time through a level, whatever) you think might be an interesting basis to award one or more achievements, and then award the achievement when that stat reaches a certain value. If you proceed with your current line of thinking you should be able to implement a working system with little trouble.

For best flexibility you'll want probably want to consider tracking a few different kinds of data:
  • Simple counters. Used as you described to count the number of times something happens. Common examples might be kill counts, pick-ups, or repeating some action a certain number of times. All you need to do is increment the stored value, and once it reaches a certain threshold the achievement is unlocked.
  • Timers. If your game has sections or levels, you can time how long the player takes to complete each, and store the lowest value each time. You can then set goal times, and perhaps even have different rankings for bronze, silver and gold completion times. This is marginally more complicated than just counting a value, but not overly difficult as long as you have access to some sort of timing function, and it's a pretty popular type of achievement in games where it is appropriate.
  • Conditions under which a certain goal is accomplished. You might for example have an achievement for completing an entire level using only the most basic weapon. This is again a little more complicated than either timing or value-counters, but can potentially offer more interesting goals. You would most likely implement this using a series of flags; considering my example of completing a level using only the basic weapon, you would store a boolean value that is initially set to false and changed to true as soon as the weapon is changed. At the end of the level or game play section, you then check if your boolean has been toggled and award the achievement if appropriate. Obviously this type of achievement is very specific to your game play, and harder to generalise than the above options.

If you're developing Flash games, it's worth noting that you could choose to embed an existing system such as the Mochi Achievements API (check the developer section, they have a number of other useful tools as well.), or if you're publishing on certain platforms they might provide their own achievements API such as the one provided by Kongregate. Even if you choose not to make use of these options, it might be worth having a look at the functionality provided to get ideas for your own system.


Hope that's helpful! Posted Image

: : Elaboration.


#1jbadams

Posted 06 August 2012 - 07:50 PM

Yep, you're on the right track: all you need to do is keep track of any statistic (kills, doors opened, times the player has jumped, fastest time through a level, whatever) you think might be an interesting basis to award one or more achievements, and then award the achievement when that stat reaches a certain value. If you proceed with your current line of thinking you should be able to implement a working system with little trouble.

If you're developing Flash games, it's worth noting that you could choose to embed an existing system such as the Mochi Achievements API (check the developer section, they have a number of other useful tools as well.), or if you're publishing on certain platforms they might provide their own achievements API such as the one provided by Kongregate.


Hope that's helpful!

PARTNERS