Skip to content

Achievements

Players see your game’s achievements on its page in the launcher, with how rare each one is and the experience it gives:

Achievements on a game’s page in the Spawnle launcher

In the launcher, open Developer dashboard, find your published game and press SDK. For each achievement:

Field
Key What your code uses: first-win. 1–40 characters, lowercase letters, digits, - and _. Keep it stable — changing it makes a new achievement.
Name What players read: “First win”. Up to 60 characters.
Description How to get it: “Win your first round”. Up to 200 characters.
XP Spawnle experience it gives, up to 100.
Hidden Its name and description stay secret until unlocked.

A game can have up to 200 achievements, worth up to 1,000 XP in all.

const result = await spawnle.achievements.unlock("first-win");
if (result.newly) {
showToast(`🏆 ${result.name} · +${result.xp} XP`);
}

Unlocking an achievement the player already has is fine — newly is false and nothing else happens. Unknown keys fail with not_found.

When an achievement is new, Spawnle also:

  • notifies the player in the launcher,
  • adds its XP to the player’s level (XP from your own games does not count, so developers cannot farm their own),
  • updates the share of players who have it.
const list = await spawnle.achievements.list();
for (const a of list) {
console.log(a.key, a.unlocked, `${a.percent.toFixed(1)}% of players`);
}

Hidden achievements the player has not unlocked come back with an empty name and description — show a padlock and “Hidden achievement”.

  • Reward play, not grind: “Beat the boss without taking damage” beats “Play 100 hours”.
  • Mix easy ones (most players get them) with a few rare ones.
  • Use hidden achievements for secrets and story spoilers.