C++ Badges

From J2Play

Jump to: navigation, search

Contents

BETA

contact developer@j2play.net before using this feature for technical support

READ THIS

The Badge admin interface is being reworked to simplify the badge creation process please contact developer@j2play.net if you want to add badges to your game until we get the new and improved Badge Admin released shortly. If you have a hard time coming up with good Badge ideas feel free to contact us for advice and our producers will work with you to add good badges to your game.

Badge Spread Sheet

In order to add badges to your game you need provide J2Play with a spreadsheet (excel file, or google docs) of the badges for your game. Add 3 columns to the spreadsheet with the following names:

  • Badge Name: Name of the badge
  • Badge Condition: The condition the player has to get in order to unlock the badge
  • Badge Credits: The number of credits the player gets after unlocking the badge (see Credits Conditions below)

Credit Conditions

Each game gets a total of 100 credits which can be distributed across a collection of badges at the developer's discretion. For example, a game can have 10 badges each worth 10 credits, 100 badges worth 1 credit, or 10 badges worth 5 credits and 5 badges worth 10 credits. Any combination badges and credits is acceptable as long as they add up to 100 credits.

List the badges, conditions, and credits awarded in the spreadsheet.

Contact J2Play

Contact developer@j2play.net and include the following information in the email:

  1. Badge Spreadsheet
  2. Name of the game
  3. Game_ID of the game
  4. A link to your game

You will be provided with the code if required to include in your game to activate these badges.

Quick Badges

Quick Badges do not require any additional code in your game. If you have already implemented leaderboards in your game you can take advantage of quick badges. All you have to do is come up with badges based on the score's your are passing in to the leaderboards. Here's an example:

Example:

  • You have two leaderboards "Time" and "Score" in your game being passed to the J2Play Leaderboards feature.
  • Create 5 Badges with three different times:
    1. If player beats the game under 2:00 mins they get the Bronze Badge worth 10 Credits
    2. If player beast the game under 1:45 mins they get the Silver Badge worth 15 Credits
    3. If Player beats the game under 1:15 mina they get the Gold Badge worth 20 Credits
    4. If Player gets score of 100 gets score badge level 1 worth 2 Credits
    5. If Player gets score of 200 gets score badge level 2 worth 3 Credits
    6. If Player gets score of 500 gets score badge level 3 worth 5 Credits
    7. If Player gets score of 1000 gets score badge level 4 worth 10 Credits
    8. If Player gets score of 5000 gets score badge level 5 worth 15 Credits
    9. If Player gets score of 10000 gets score badge level 6 worth 20 Credits

Create the badge spread sheet as described above with the 50x50 Icons and contact us. We will setup the badges and you don't have to add any additional code to your game. Quick badges only apply to scores that are being passed to leaderboards. If you are submitting multiple score types you can use any of those score types for quick badges.

Advanced Badges

The code will be provided to developers after we receive the email, here's a sample of what you will receive:

Badges are defined as follows:

  1. int badgeID; // define the type of a badge
  2. std::map<int, std::string> badgeProperties; // define the properties of a badge

Every property in badgeProperties is a key / value pair (id=>value)

int badgeId // identification of badge argument
std::string value; // the value of specific badge argument

The following method notifies the platform when the player acquires a badge:

Links

Personal tools