zachpmanson / minecraftle

A daily puzzle game fusing Wordle and crafting recipes
https://minecraftle.zachmanson.com
GNU Affero General Public License v3.0
43 stars 19 forks source link

Stats page seems to have broke since yesterday #34

Closed suppergerrie2 closed 8 months ago

suppergerrie2 commented 8 months ago

These were my stats yesterday (22/01/2024) image

These are my stats today (23/01/2024) image

I lost way more spots than I expected, and am somehow 66 spots ahead and behind. I also gained 7 wins in one day?

zachpmanson commented 8 months ago

Hi sorry about this. I just pushed a full rebuilt and the stats calculations still have some bugs clearly! The total number of games and your number of wins/losses should be accurate, but I need to do some tuning on the ranking algorithm

suppergerrie2 commented 8 months ago

I know for a fact that the wins/losses is now incorrect, on 18/01/2024 the answer was a piston, which is my starting recipe. I, together with some of my friends, got the answer in one guess. The new stats page does not show me as having a win in 1 attempt. Could it have mixed up my wins with someone else's?

Thanks for making this btw, very impressive and it has been really fun to play with friends!

zachpmanson commented 8 months ago

I found a number of bugs because of this! I've fixed the display of the margin be players and their neighbours on the leaderboards, now it will show the proper amount of points or if points are equal it will show the difference in number of attempts (this was always used to calculate scores but wasn't visible till now).

I also found a huge amount of duplication in the database, leading to many players having around double the amount of points they should have. The biggest giveaway for this was the number 1 player having more points than days the game has been released, and given you could only get 1 point a day this was very suspicious. This has been resolved now, but affected players will notice their score drop significantly which I hope isn't too demoralizing.

I've moved to postgres now, so these kind of problems should no longer happen. I've also indexed the database in a way that will make loading the stats page MUCH faster.

I've rejigged the scoreboard calculations since there was so problems in how it was being handled before, so I expect most people's ranks to shuffle around a bit, hopefully none too large.

Thank you for this issue, having the screenshots was extremely helpful in debugging this problem, and I'm glad you enjoy the game!

suppergerrie2 commented 8 months ago

All seems to work now! Thanks for fixing it so fast! And it does indeed seem way faster which is nice! <3