Sponsored By

Achievement mechanic with Badge Keeper (early stage review)

Ever thought of saving development time? Never used achievements and wonder how to use them efficiently? Read on how one can start working on adding achievement mechanic in his/her application and end up creating a web-service for that purpose.

Ilya Kivilev, Blogger

August 3, 2015

8 Min Read

Hi everyone, in this post I’d like to share the experience we got while working on adding achievement system to our application and ended up creating an online service.

I assume there’s no need to explain what “achievements” are and what are they used for in applications, so I will go ahead and share my story.

Where the idea came from

It all started when we wanted to add an achievement mechanic to our application. The application was developed by only one person in his free time and, as usual, there were a lot of assignments to work on. We did not want to invest too much time working on this mechanic for a few reasons. First, insufficient time due to other assignments with higher priority and vague vision of usage effectiveness. The latter was based on the fact that the application was not a video game where achievements mechanic looks familiar for most of today’s users, but so called “serious app” for managing personal budget. Lastly, we didn’t want to spend our development efforts supporting this mechanic after release and force our users to download multiple updates if we ever wanted to change the logic behind achievements or add new ones.

Search for existing solutions

We started thinking about placing of achievements logic into external module or service. After a while we came to investigation of existing solutions as a service. As a result we found the following list (the list might be far from ultimate so I will appreciate if anyone could give info about other services):

  1. Google Achievements
    Could be used for the application even if it is not published on Google Play.Some confusing points:

    • Achievements made strictly for video games. You are asked to fill “Game Title” and “Game Category” fields on submission form. If I ever call financial application “a game” then the most relevant category would be “Adventure”;

    • In your application you need to operate with “Achievement ID”, which is not the most comfort way of managing logic in your program code;

    • The first attempt to sign up to Google Play and make payment for developer account was failed due to unknown reason. Customer Service was responding to my request for several days, which helped us to continue our investigation.

  2. Apple Achievements
    No ways of using it on platforms different from iOS SDK. This is very important for me since I planned to provide a web interface for my application, so in this case I would have to duplicate all the achievements logic manually.

  3. Steam achievements
    Available for games published on Steam service only.

  4. Sony trophies
    Available for games published on Sony Playstation Store only.

  5. Hydra
    This service had interesting feature list relevant to our search. However it is still in closed beta state and we didn’t have a chance to give it a try.

  6. App 24
    This service was relevant to our search, however achievements were not its core functionality. It contained other services that we didn’t need and the interface was not user friendly.

We thought that it would great if any service provided usage statistics to monitor the threshold of single achievement to analyze its effectiveness. This is very important when implementing such logic.

We don’t want to create it, we want to use service

As you might have guessed, our inspiration to implement the mechanic in our application made it desirable for every software developer which is to create his or her own service. We came up with the following requirement set:

  1. Platform independent. You can work with the service from any platform, all you need is to leverage pre-built SDK or access it directly via REST API;

  2. Independent from application type. It doesn’t matter what you are working on. This could be a video game or any other application where you can get advantage of achievements to add some gamification;

  3. It’s so fast and simple to connect your application to service as 1-2-3. No need to read several pages of a manual to find out how this thing is constructed;

  4. Easy to use. Adding new achievements has never been easier and application program code is the less dependent from the service.

Prototype in 2 months

It took 2 months to create working prototype with a few features implemented and a demo site.

  1. Creating of projects and project’s achievements;

  2. Tracking application events and detecting the moment when achievement is unlocked. All the logic is done on service side and is defined with simple condition string. The application only needs to send the updated value of the variable to the service. You will find the sample screenshot below;

  3. Granting user with rewards upon achievement unlock. It is the applications’ responsibility of processing the reward. The service only knows which bonus to give for the certain achievement;

  4. Sandbox mode. Such feature is pretty much intuitive, since it’s a good practice to test if your thresholds are too tough to reach and fine tune them before publishing. Achievement’s unlock condition is locked for editing after publishing.

It is worth stressing that at the moment the service is way too far from great UX, since we put all our efforts in developing service itself. Now we decided to post this review to get the feedback from fellow developers.

How it works

Some words about how we built it. To keep this review short I will not go into much details about why how and why chose the platform for our service. Our choice was Azure cloud service. We process requests using REST protocol. All the application data are stored in Table Storage for better performance.

In order to create an achievement you need to set its unlock condition. You can set your conditions in formula style, e.g. scores >= 150. Scores is the variable name that application sends to the service with POST request. The request also contains users’ unique identifier. When received, the current value of the scores variable for that user is checked against the condition stated in any formula containing scores variable. If the formula evaluates to true, the service will respond with unlocked achievement.

You can set more complex formulas; for example:
level5_kills = 25 and level = 5 and (health >= 90 and health <= 100)

In this case achievement will be unlocked once all the formula conditions will evaluate to true. You can send values for this formula in separate or single request. Anyway the service will check current values for all variables even if they were sent earlier.

To provide security and prevent possible fake data, we are implementing HMAC authentication.

How it looks like

After logging in you will see your projects list. Each application needs to have a project created in Badge Keeper service.

This is how project looks like. Each project can have multiple achievements with its own unlock condition.

And this is how an achievement looks like when edited.

On the showcase page you can see how it works on our sample project. For the sample project, we took Snake game made on JavaScript, and connected it to the service.

I don’t make games, can I still use it?

Though this post was written special for Gamasutra readers, which constrains it to be game-related, I would clarify that the idea behind this service is not limited by only game applications. Below are a few example of where it can be successfully used:

Video games
Create achievement mechanic once and seamlessly use it on any device. Your client can start playing on iPhone and continue on iPad without losing any unlocked achievements.

E-commerce projects
Want to add gamification to raise retention? Ever thought of giving incentives to your clients? This is possible if your e-commerce solution is integrated with Badge Keeper. Read more about Rewarded Achievements.

Publishers
Want to create another killer of Kongregate? Easily connect your platform to Badge Keeper and provide your users with built-in cross-platform functionality of achievements.

The conclusion

Despite of existing solutions, even from such giants as Apple and Google, we assume this service has its potential considering easy usage experience, less dependencies with applications and extended functionality of achievements.

After this really short development cycle, we collected a list of future improvements and extensions that we would like to have in the service. We believe that we have something to offer other developers who don’t want to spend their time to secondary application mechanics and help them focus on primary tasks to develop core functionality. We have some really cool features in mind which will help small teams boost up their development speed, however we would like to make sure if such service is of any interest to others.

Without going any further we would like to receive a feedback and understand the best ways of how this service could be used. Also, there’s a chance that we have missed something important. We are wide open for feature requests as long as they do not break the main vision of the service. If this review was interesting to you, but you didn’t find necessary functionality, you can always reach us in comments section in this article or send us a message using our contact form. If you like the idea of the service follow us on Twitter to stay tuned to latest news about development.

Thanks for your time! We appreciate any feedback, questions and comments.

Read more about:

Blogs

About the Author(s)

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like