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
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
Related Issues