- Your are asked to implement at least 15 achievements and a score.
- It's not needed that those achievements actually exist in-game, they will be shown on portal.
- For primary licenses: when implementing api, ensure the game still works ok on any domain.
- For sitelocks: the game must be locked to work on the domain kiz10.com or in any subdomain (like cdn.kiz10.com).
- As far as you can, please use our stats system to implement your achievements (where it applies, see bellow).
- Normally you'll be asked to play your game on the portal and unlock all the achievements, to validate them. For achievements consisting on reaching some goal number that are implemented using the GOAL field, it will be enough to anotate some progress (no need to reach the goal to validate).
- Please, use stats.
- Really, use the stats please (thrust me, it's faster to implement and test).
You'll need to know the identifier of your game on the portal and also an "api-key" to be able to use the api in your game. Both things are shown in the game profile. If you don't have an api-key, you can create one by clicking on "Generate api-key".
Then follow the appropiated instructions for your environment:
We need some score on ALL our games. If your game doesn't have score, please think on some formula appropiated for your game (something like 100*levels_passed + enemies_killed), and submit the result as score.
You'll first need to create a "named stat" on the portal. Use the developer console to create it with the next data:
- STAT_CODE: "score"
- DISPLAYNAME: "Score"
- TYPE: 1 for "the higher the best" or 2 for "the lower the best" types.
- LIMIT (optional): Max (or min) value of the score if it applies.
- SCOREBOARD: 1 (first check "show as scoreboard")
Once you've created the score stat, add this line to the relevant part of your code:
Where "value" is the actual value (integer number) of the score.
Please, keep low the number of calls to the api. Good places to make this call are usually the level complete screen and when player dies.
If your game needs more than one scoreboard, create aditional stats, and use the "SCOREBOARD" field to sort them (first check "show as scoreboard").
We ask you to implement at least 15 achievements for the game.
You'll first need to create the achievements using the developer console.
There are two types of achievements:
- Unlocked when some event occurs in the game ("Beat level 3 without being hit").
- Unlocked by reaching specific values in some stat ("Kill 100 enemies").
For the first case, you just need to create the achivement with this information:
- ACHIEV_CODE: a code-name for the achievement (max. 32 characters)
- DISPLAYNAME: Name to be shown on the portal.
- DESCRIPTION: Description of the achievement.
- POINTS: dificulty level of the achievement (points to be awarded).
- GOAL: 1.
- STAT: none
- ICON: Upload a 50x50 icon for the achievement.
And add this line to the part of code where the event occurs:
NOTE: For the "points" field, use this rule:
- trivial dificulty: 5 points.
- easy dificulty: 10 points.
- moderate dificulty: 20-30 points.
- hard dificulty: 50 points.
- very hard dificulty: 100 points.
Please keep the total points arround 500.
The second case of achievements are the "progresive" ones. You can implement these the same way that the previous ones (just unlock when the goal is reached), but it looks better if the portal can show the player progression. To do this, you should set the number to reach in the GOAL field of the achievement. You'll also need to store a variable in your game with the current number to send it when applies.
IMPORTANT: the portal does NOT add the values you send, the game must allways send the current amount.
You may even want to create more than one achievement regarding the same stat. If this is the case (for example "kill 20 enemies", "kill 100 enemies", ...) create also a stat for them, similar to the "score" one, but with type=1, scoreboard=0 and a proper code, and indicate this stat code in the STAT field of every achievement which uses it.
Then you'll just need to put this line in the relevant part of your code:
And the portal will check automatically all the achievements regarding that stat code.
Note: you can use the "score" stat to set achievements too.
For the achievements which don't share stat with others you don't need to create any stat, just create the achievement like in the previous case (STAT field empty), and use this code to send the progress:
Please, again keep low the number of calls. For example, don't call submitAchievProgress("killed_enemies", killed) every time the player kills an enemy if he/she will kill one of them every second. You can call it once every 10 times, for example, depending how fast it can be.