EvoEsports / minicontrol

Minicontrol for trackmania united forever, maniaplanet and trackmania 2020
GNU General Public License v3.0
11 stars 10 forks source link

Adds plugin to display the top 50 players of the server #66

Closed Mery042 closed 3 weeks ago

Mery042 commented 3 weeks ago

The plugin fetches the records of the maps list by ascending order on time attribute. It assigns rank to each player. It calculates the points of each player with (recordsCount - rank) + 1 and adds it to the points amount of the player. Then, we calculates averages by dividing these points by the maps count and sorts the array by descending order. Finally we attribuate a final rank to each player in the array and we have our ranking for the server.

Chris92de commented 3 weeks ago

Hey @Mery042, thanks for your pull request. Could you please explain more about the feature and maybe show off some screenshots of what this does?

reaby commented 3 weeks ago

Thanks for the pull request! I see there's a huge bottleneck with the way you implemented the rankings, that is many servers have more than 100 maps, mostlikely more than 500 even. Your implementation would generate one query for each map, thus making 500 queries or more, which is something we really wish to avoid.

Sorry mate, but I have to close this pullrequest as not merged.