Skip to content

Conversation

@jacobtread
Copy link
Member

Description

Leaderboards are no longer computed lazily at runtime instead they are now stored in the database and updated through the game packets that are submitted as per #60 this is a breaking change so the version number has also been increased.

Thanks @Aim4kill for letting me know about the packet that provides the values for updating the leaderboard.

With these new changes players will not appear in the game leaderboards unless they have completed at least one game, they don't have to win the game they just have to finish it (Dying straight away counts as finishing it) and then they will appear on the leaderboards with their score.

These changes should improve server performance as computing the entire leaderboard at fixed intervals is less than ideal (Although the server still managed to do this relatively easily without any issues with a decent number of users so you never know, SQLite's performance never ceases to amaze me)

Changes

  • Removed old leaderboard service and relating compute logic
  • Added database migrations and structures for leaderboard storing
  • Added parsing for leaderboard updating game result packets

Related Issues

@jacobtread jacobtread added the enhancement New feature or request label Dec 5, 2023
@jacobtread jacobtread self-assigned this Dec 5, 2023
@jacobtread jacobtread merged commit 22a962a into dev Dec 5, 2023
@jacobtread jacobtread deleted the 60-task-persistent-leaderboards branch December 5, 2023 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants