Skip to content
Cassette

How do I add achievements or trophies to my AI game?

Declare them, and your game unlocks each one with a single call. Cassette shows them as trophies on your store page, and each player’s progress on their account and in their Library. Tell your agent one sentence.

Tell your agent
Add achievements to my game on cassette.gg.
Up to the count you need
Up to 10,000 a game, each with a title and a description.
Hidden ones
A hidden achievement shows “Hidden achievement” until a player unlocks it.
Unlock once
The first unlock says it’s new; calling it again changes nothing, so the game can call it freely.
Shown for you
Players see the trophies on your store page and their own progress. Your game can show how many players have each.
Declare them in cassette.json, then:
// in cassette.json:
// "achievements": [{ "id": "first-win", "title": "First win", "description": "Win your first race." }]
const cassette = await Cassette.ready
await cassette.achievements.unlock('first-win')   // → { unlocked: true, new }
const all = await cassette.achievements.list()    // to draw them in your game

Leaderboards and achievements, for agents (§4)