Add global statistics screen#3818
Open
franciscogfsm wants to merge 1 commit into
Open
Conversation
Implement a global statistics view with menu integration and persisted aggregation for worldmap and levelset progress. For example, coins collected in a completed level now appear in the global totals instead of showing zero. Co-authored-by: João Moura <joaofsmoura@tecnico.ulisboa.pt>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new global statistics feature to SuperTux, allowing players to view aggregated statistics across all worlds and levels. The implementation includes new classes for statistics management, updates to the main menu, and localization support for new UI elements. It also refactors how level completion statistics are tracked and saved.
Global Statistics Feature:
GlobalStatsManagerclass to aggregate and provide summary statistics (coins, secrets, dolls, levels, time, etc.) across all worlds and levels. (src/supertux/global_stats_manager.cpp,src/supertux/global_stats_manager.hpp) [1] [2]GlobalStatsMenuandGlobalStatsScreen, accessible from the main menu, to display these aggregated statistics to the player. (src/supertux/menu/global_stats_menu.cpp,src/supertux/menu/global_stats_menu.hpp) [1] [2]src/supertux/menu/main_menu.cpp,src/supertux/menu/main_menu.hpp,src/supertux/menu/menu_storage.cpp) [1] [2] [3]Level Statistics Tracking Improvements:
LevelsetScreento track and update best statistics (coins, tuxdolls, secrets, time, perfect completion) for each level, and save these in the player's savegame. (src/supertux/levelset_screen.cpp,src/supertux/levelset_screen.hpp,src/supertux/game_session.cpp) [1] [2] [3] [4] [5] [6] [7] [8] [9]Localization:
data/locale/messages.pot,data/locale/pt.po,data/locale/pt_BR.po) [1] [2] [3]Build System:
CMakeLists.txt)