Some helpful integration tips from Greg (creator of badges & challenges)

Here are some general tips I have that you can follow to make my life easier, and to reduce the chances that I’ll whine to you over email and ask you to change something.

1. Please add a “max” stat that’s something like “GameComplete 1” for when your game is finished.

This is a no-brainer stat that allows me to add a badge for simply completing your game.

2. The “add” type of stat is primarily a novelty.

It has lots of problems when used for most badges. If you have an “add” stat for kills across games, users can simply play the game repeatedly to get ridiculously high scores. Even if you only add stats for unique completions in the game, users can simply wipe their save file in most cases. Anything that uses the “add” stat will ONLY be considered for “easy” badges. (It doesn’t hurt to add a few of these in, though, even if they won’t be used for badges—it can be sort of interesting to load up the high scores and see how many times a user has done something.)

An example of how this stat can mess things up: Mezzo Winter Edition used to report an “add” stat for completing levels that the user had not yet completed. I set up a badge requiring that “levelscompleted = 30” (30 was the total number of levels, and a “1” was sent each time a new level was completed). Unfortunately, all that was required was a single connection blip on a single level to make the badge impossible to earn. Unless, of course, the users wiped their saved data, in which case they could simply beat the same level 30 times to unlock the badge. The solution here was to simply report a “GameComplete 1” stat when level 30 was completed.

Even in games like Amberial, the “add” stat for collecting all 15 aces is NOT optimal because, again, users can exploit the system by erasing their saved data, or they can be completely screwed over if there’s a connection failure at the time of collecting any of the 15 aces (not only will they not get the badge, but they won’t be ABLE to get the badge unless they erase their data, since now that ace has already been collected, but Kongregate doesn’t know it!). The best thing to do here is to continually report to us how many aces the user CURRENTLY has. That way, even if there’s a connection failure, the user can simply come back later (or wait for the problem to clear up) in order to claim the badge. (This is what the developer does and always has done; I’m just using it as an example of how it COULD have gone horribly wrong if the “add” stat was used.)

3. Please connect in the first frame.

As seen in the Johnny Rocketfingers games, it IS possible to connect at the same time that a statistic is reported, late in the game. However, this can be confusing to the user (since the light in chat will be red, even when it’s working properly), and it’s also a pain for me to test, since I have to personally beat the entire game just to see if the game is able to connect to us at all.

4. Report stats often.

Or at least more than just once! Sometimes developers will include all sorts of great statistics in their games, but they’ll only report them once the game is actually completed. This makes it impossible for me to make any badge other than “finish the game,” regardless of what kind of other fun stuff is reported. Feel free to report everything at the title screen, too! That way, if I make a badge after someone has already completed the task, that person will only need to load up the game to be awarded the badge (this only works with games that use some kind of save system, obviously).

5. Separate difficulties!

If your game contains multiple difficulty settings, please report them separately, such as “PointsOnEasy 34907” or “GameCompletedHard 1.” If you don’t, I have to assume that the user is simply going to set the game on the easiest setting possible in order to achieve the badge, which really limits my options.

6. You must report a whole number.

You can’t simply report the English names of areas to us that the player has completed. Obviously the statistics need to have names, but they also need to have a number associated with them, even if that number is just “1” when the area is completed.

Additionally, it must be a "whole" number - no decimals are supported. This means for races against the clock, if you are measuring thousandths of a second, you should report in milliseconds (so 4.316 seconds is a score of 4316).

7. I cannot do “or” conditions.

When I make badges and include multiple tasks, I can only require that users complete ALL of the tasks, not just one of them. So if your game has multiple endings and you send us either a “GameEnding1 1” or “GameEnding2 1” for completion conditions, I CANNOT make a badge that is something like “complete the game with either ending.” For this, you should send something like “GameCompleteEither 1” that is sent if EITHER ending is completed. You can do additional stats that are more specific if you’d like, but please try to include general ones as well!

An example of this can be seen in the game “Fold.” The developer, Joel, is reporting a general stat for if the player completes a stage with lives remaining OR in ghost mode (ghost mode occurs if all lives have been lost, and the player continues). This is in addition to 2 other stats, which are specific to whether the player has lives remaining or if the player is in ghost mode. If Joel weren’t reporting the general stat that includes both conditions, it would be impossible for me to allow ghost mode at all, since players with lives remaining would need to commit suicide in order to complete the achievement (in other words, if I set the conditions to allow ghost mode, it would REQUIRE ghost mode). If you want an “or” condition in your statistics, you need to be the one to set it up!

8. Double-check for in-game exploits.

Can your game be completed by doing the ol’ fashioned “right click: play/forward”? Can your mouse avoider game be exploited by disabling the cursor or warping it through obstacles by right-clicking? Can ridiculously high scores be achieved by doing some repetitive task for 30 minutes on the first level? Can in-game unlockables make achieving a certain task ridiculously easy? If so, please clean it up, or report the stat in such a way that makes the exploit impossible to use.

For example, “Streamline” used to have a bug in which highlighting the number of lives in the lower-left corner made the player invincible. The developer addressed this issue by causing immediate death if the player clicks anywhere on the screen (this is why clicking causes death in the Kongregate version, but not in versions on other websites).

In “Gravitee,” the final unlockable shows the player the perfect path to a hole-in-one on every course. This would trivialize the impossible badge, in which players must score really well on each hole. To address this, the developer simply doesn’t report the completion of a platinum medal (required for the impossible badge) if the player makes use of the hole-in-one displayer.