[PR #2277] [MERGED] RetroAchievements Leaderboards implementation #946

Closed
opened 2026-01-29 19:10:17 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stenzek/duckstation/pull/2277
Author: @CookiePLMonster
Created: 6/19/2021
Status: Merged
Merged: 6/19/2021
Merged by: @stenzek

Base: masterHead: leaderboards


📝 Commits (3)

  • c705eea Expose additional functions from rc_url.h
  • e361212 Basic leaderboard integration
  • cce40a8 Implemented Leaderboards UI

📊 Changes

6 files changed (+581 additions, -7 deletions)

View changed files

📝 dep/rcheevos/include/rc_url.h (+14 -3)
📝 dep/rcheevos/src/rurl/url.c (+3 -3)
📝 src/frontend-common/cheevos.cpp (+192 -0)
📝 src/frontend-common/cheevos.h (+24 -0)
📝 src/frontend-common/fullscreen_ui.cpp (+347 -1)
📝 src/frontend-common/fullscreen_ui.h (+1 -0)

📄 Description

This PR expands the existing RetroAchievements support to also cover leaderboards, a feature present in numerous games.

Example of a RA leaderboard for a PS1 game:
https://retroachievements.org/leaderboardinfo.php?i=19974

  • Leaderboards adhere to the Test Mode - when enabled, no scores are submitted to the server.
  • There is currently no paging support, I populate each leaderboard with a single request to obtain the top 15 entries (+ user's score, as that's how RA returns data). Paging may be added in the future, but it will require issuing additional requests to the RA server.
  • Scores are not cached locally beyond the simplest possible cache - leaderboard results are persisted if the user keeps opening the same leaderboard over and over, and discarded upon opening a new leaderboard or submitting any new leaderboard score.
  • UI is fully implemented, with every leaderboard previewable in a new Leaderboards menu. Leaderboards are populated asynchronously, and during that (brief) period of time the user will see a "Downloading leaderboard data..." message. Clicking the X button when a specific leaderboard is shown will not close the menu, instead it will take the user back to the "main" leaderboards list. I feel like this is preferable over closing the pause menu completely, as it'll allow the user to quickly preview multiple leaderboards.

duckstation-qt-x64-DebugFast_3Jp7ttHVLY
duckstation-qt-x64-DebugFast_mDelVDKzsk
duckstation-qt-x64-DebugFast_xODBbBRXwp


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stenzek/duckstation/pull/2277 **Author:** [@CookiePLMonster](https://github.com/CookiePLMonster) **Created:** 6/19/2021 **Status:** ✅ Merged **Merged:** 6/19/2021 **Merged by:** [@stenzek](https://github.com/stenzek) **Base:** `master` ← **Head:** `leaderboards` --- ### 📝 Commits (3) - [`c705eea`](https://github.com/stenzek/duckstation/commit/c705eea3f9ea68a1ac4e7122014531de1049dac8) Expose additional functions from rc_url.h - [`e361212`](https://github.com/stenzek/duckstation/commit/e361212bbfdb02d859c226b6a17b37ceed461823) Basic leaderboard integration - [`cce40a8`](https://github.com/stenzek/duckstation/commit/cce40a85dddc11e8d88f50679f3ba46fbb3d5537) Implemented Leaderboards UI ### 📊 Changes **6 files changed** (+581 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `dep/rcheevos/include/rc_url.h` (+14 -3) 📝 `dep/rcheevos/src/rurl/url.c` (+3 -3) 📝 `src/frontend-common/cheevos.cpp` (+192 -0) 📝 `src/frontend-common/cheevos.h` (+24 -0) 📝 `src/frontend-common/fullscreen_ui.cpp` (+347 -1) 📝 `src/frontend-common/fullscreen_ui.h` (+1 -0) </details> ### 📄 Description This PR expands the existing RetroAchievements support to also cover leaderboards, a feature present in numerous games. Example of a RA leaderboard for a PS1 game: https://retroachievements.org/leaderboardinfo.php?i=19974 * Leaderboards adhere to the Test Mode - when enabled, no scores are submitted to the server. * There is currently **no** paging support, I populate each leaderboard with a single request to obtain the top 15 entries (+ user's score, as that's how RA returns data). Paging may be added in the future, but it will require issuing additional requests to the RA server. * Scores are not cached locally beyond the simplest possible cache - leaderboard results are persisted if the user keeps opening the same leaderboard over and over, and discarded upon opening a new leaderboard or submitting any new leaderboard score. * UI is fully implemented, with every leaderboard previewable in a new Leaderboards menu. Leaderboards are populated asynchronously, and during that (brief) period of time the user will see a "Downloading leaderboard data..." message. Clicking the X button when a specific leaderboard is shown will **not** close the menu, instead it will take the user back to the "main" leaderboards list. I feel like this is preferable over closing the pause menu completely, as it'll allow the user to quickly preview multiple leaderboards. ![duckstation-qt-x64-DebugFast_3Jp7ttHVLY](https://user-images.githubusercontent.com/7947461/122623744-99942d80-d09d-11eb-920d-b35caa103153.png) ![duckstation-qt-x64-DebugFast_mDelVDKzsk](https://user-images.githubusercontent.com/7947461/122623749-9d27b480-d09d-11eb-97ef-b7af94931464.png) ![duckstation-qt-x64-DebugFast_xODBbBRXwp](https://user-images.githubusercontent.com/7947461/122623750-a022a500-d09d-11eb-91fb-477b04eb2d2c.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 19:10:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#946