Skip to content

Conversation

@aIIison
Copy link
Contributor

@aIIison aIIison commented Jul 26, 2024

ezgif-2-08eea57ded

Integrate boards into the in-game leaderboards.

  • Runs in top 40 are shown.
  • Autorenders can be opened by clicking on a run.
  • Gets around the issue of Steam boards being down.

Technical stuff

  • Merged AutoSubmit and AutoSubmitMod, everything uses the autosubmit.key format (first line for website URL, second line for key), this should be changed on the main boards website as the download.
  • top-scores API (from Mel boards) needs to be implemented to main boards (so we can actually display top 40 scores around the player).
  • Map IDs for base game should be moved to the website as an API endpoint (similarly to Mel).
  • FIXME: Heap gets corrupted on run finish, something goes wrong with freeing the avatar images.
  • Autorender opening currently only works in games with updated Steam APIs.

Notes

  • I left xrefs in as comments for some stuff so they are easier to find if needed (I assume atleast some of the sigs are going to be different for linux mods).
  • Code is written in a way that in the future if we want to, it's easy to implement LP boards too.

@aIIison
Copy link
Contributor Author

aIIison commented Jul 28, 2024

Just added option to store all keys in the same file (useful for p2common users), e.g.:

board.portal2.sr
key1
mel.board.portal2.sr
key2

And now key files with old format get automatically converted to new one, accounting for the change I just made.

@ThisAMJ ThisAMJ force-pushed the feat/board-integration branch 2 times, most recently from 6a9f6a5 to af9240e Compare August 7, 2024 07:54
@ThisAMJ
Copy link
Member

ThisAMJ commented Aug 8, 2024

p2sr/Portal2Boards@e0df39d

don't plan on merging until the crash is fixed and LP is supported (maybe just use the builtin lp thing if that's possible)
and all da mods

aIIison and others added 4 commits November 7, 2024 23:16
* merged AutoSubmit and AutoSubmitMod (everything uses autosubmit.key format now)
* FIXME: heap gets corrupted on run finish
* TODO: top-scores API not implemented currently (needs to be done server-side first)
* TODO: map IDs should be stored server-side
@aIIison
Copy link
Contributor Author

aIIison commented Aug 13, 2025

oops that was an accident

json11::Json::array AutoSubmit::GetLeastPortals(std::string &map_id) {
if (!ensureCurlReady(&g_curl_search)) return {};

auto response = request(g_curl_search, "lp.pektezol.dev/api/v1/maps/" + map_id + "/leaderboards?page=1&pageSize=40");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants