supertux icon indicating copy to clipboard operation
supertux copied to clipboard

In-game achievement system

Open Vankata453 opened this issue 2 years ago • 1 comments

In-game achievement system, which manages global and level achievements. Current level achievement progression is only counted towards the global one when the current level is completed. Achievement data is saved as achievements.stad in any profile folder. Currently, all achievements have to be hardcoded and are global for the game. World-specific custom achievements, which can be progressed through using scripting, are a potential idea for the future.

Included with this PR are also horizontal menus (currently only used for displaying achievements) and achievement notifications, which are a slightly-modified version of the regular ones and have transitions on showing and hiding, as well as display in the top-center part of the screen.

image image

Achievements are initialized in achievement_system.cpp, in the initializer. Currently, 2 sample coin achievements (one level-specific and one global) are available, only for demonstration purposes.

Note: Keep in mind the changes in coin.cpp are temporary and are used to accompany the included sample achievements.

Vankata453 avatar Dec 03 '22 16:12 Vankata453

Could you resolve merge conflicts and fix compilation errors?

mrkubax10 avatar Aug 19 '23 07:08 mrkubax10