Skip to content

Add Achievements extension - #2360

Open
juslangit wants to merge 2 commits into
GDevelopApp:mainfrom
juslangit:add-achievements-extension
Open

juslangit wants to merge 2 commits into
GDevelopApp:mainfrom
juslangit:add-achievements-extension

Conversation

@juslangit

@juslangit juslangit commented Nov 16, 2026 •

Copy link
Copy Markdown

Description

Achievements: add local achievements to a game with no setup. Define each achievement once (identifier, title, description, goal), unlock it in one go or add progress until it reaches its goal. Progress is saved on the player's device, and a toast slides in when an achievement is unlocked.

There is no general achievements extension in the store yet (only platform-specific ones like Game Jolt and Wortal).

  • Actions: Define an achievement, Make it secret, Icon, Secret achievement text, Unlock, Add progress, Set progress, Reset an achievement, Reset all
  • Conditions: Achievement is unlocked, Achievement was just unlocked, Any achievement was just unlocked (true for one frame, wherever the condition is in the event sheet), Achievement is secret
  • Expressions: Progress, Goal, ProgressPercent, Count, UnlockedCount, IdAt, Title, Description, Icon, LastUnlocked (enough to build an achievements screen with a Repeat event)
  • Secret achievements: title and description hidden ("Secret achievement" / "???", changeable) until unlocked.
  • Toast: shows the achievement's icon (or a star), show/hide, 6 positions, duration, background/text/accent colors, and the label, so it can be translated. The condition "A toast just appeared" (true for one frame as each toast starts) plays a sound with each toast through the usual "Play a sound" action. Toasts are queued when several achievements unlock at once. It is drawn on its own layer, created at runtime and kept above the others, so it needs no object in the scene.
  • Saving: in local storage, under a key that includes the game name.

How to use it

  1. At the beginning of the first scene: Define achievement "coin_hunter": "Coin Hunter" (goal: 5).
  2. When the player picks up a coin: Add 1 to the progress of achievement "coin_hunter". It unlocks at 5 and the toast appears.
  3. Optional: Achievement "coin_hunter" was just unlocked → play a sound or give a reward.

Toast with an icon and the achievements list

The toast with a translated label and custom colors:

Translated toast

Example project

The example project (v1.1.0, with its assets) is linked as a ZIP in the comments. Controls: SPACE jump, C find a coin, wait 15 s, H finds the secret achievement, B moves the toast, M translates it, R resets. Its events are commented and include an achievements screen built with IdAt.

Help page (the extension's help link): https://juslangit.github.io/gdevelop-achievements/

Tested in GDevelop 5.6.287 (web export in Chrome, desktop and phone-sized screens, and a scene rendered in 3D): unlocking, progress, secret achievements, icons (and the star when an image is missing), queued toasts, the toast condition with a sound, saving across reloads, reset. Source and tests: https://github.com/juslangit/gdevelop-achievements

Checklist

  • I've followed all of the best practices. The checks of this pull request must pass.
  • New extensions are added to extensions/community/.
  • The example project is the whole folder of my project, not a build of my game.
  • The example project is attached as a ZIP file, not linked to an external service like Google Drive.
  • I've considered adding my extension to the GDevelop community list, but think it's better to have it here.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

AI usage

  • I used an AI to generate some part of the code.
  • I don't understand the generated code or I don't feel able to modify it.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juslangit
juslangit requested a review from a team as a code owner November 16, 2026 07:06
@juslangit

Copy link
Copy Markdown
Author

Example project (the whole project folder, zipped): Achievements-Example.zip

It is a single-scene project with no assets: unzip it and open Achievements Example.json in GDevelop. SPACE jump, C find a coin, wait 15 s, B moves the toast, M translates it, R resets.

… page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juslangit

Copy link
Copy Markdown
Author

Updated to 1.1.0:

  • Secret achievements (title and description hidden until unlocked)
  • An icon per achievement, shown in the toast (the star is kept when there is no icon or the image is missing)
  • The condition "A toast just appeared" and the expression ToastAchievement(), to play a sound with each toast using "Play a sound"
  • A help page: https://juslangit.github.io/gdevelop-achievements/

Updated example project (the whole folder with its assets, zipped): Achievements-Example-1.1.0.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant