supertux
supertux copied to clipboard
In-game achievement system
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.
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.
Could you resolve merge conflicts and fix compilation errors?