Hero Mages
September 19, 2019, 01:34:12 AM MT *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Hero Mages!
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: FFA leaderboard bug?  (Read 2707 times)
Scribe
Hero Mages Elite
*
Posts: 114



View Profile
« on: December 23, 2014, 02:47:28 AM MT »

Hello,

I completed game #83515 a few days ago. Being victorious, it earned me #1 spot in the FFA leaderboard, and a nice move upward in overall one.  But this game didn't go off my game list (maybe because the other players haven't checked it yet? ). It still shows "Destiny awaits". The problem is,  my scores in the leaderboards keep raising, apparently as if each time I opened the game it counted victory points again.
Could you please take a look and see what's going on?

Thanks
Logged
WorldChamp(ELITE)
Hero Mages Elite
*
Posts: 81



View Profile
« Reply #1 on: March 31, 2015, 04:37:25 AM MT »

I have the same problem..
Logged
Ross Przybylski
Administrator

Posts: 1050


D20Studios, LLC


View Profile
« Reply #2 on: April 02, 2015, 08:50:26 PM MT »

I believe I know what is causing this. For some reason, I commented out a return line in the record game method in the server code. It looks like I may have done this to fix a prior bug where game stats were not being recorded at all.

It would help to have one of you available for a live test so we can check whether my intended fix resolves the problem (this way I can also run tracers to verify the pattern I believe is causing this).

Let me know if I could get your support and when you'd be available.
Logged

Manager of D20Studios, LLC
Ross Przybylski
Administrator

Posts: 1050


D20Studios, LLC


View Profile
« Reply #3 on: April 02, 2015, 11:18:07 PM MT »

SUCCESS!!!

So, as it turns out, the server code was actually not causing the problem.

The issue was in the database limits for the "rating" column. I was using a tinyint instead of a smallint. The maximum range of a tinyint is +/- 128. The issue with this game was that when WorldChamp was eliminated, he lost 192 FFA rating points. This caused the database to silently fail as this value was out of the database range.

Because of this, WorldChamp's game status was never recorded, and from the server perspective, this game never got its stats recorded. Therefore, it would keep resetting flag for "not seen game ending" which is why it says "Awaiting Destiny".

Finally, because worldchamp's game record score wasn't captured, everytime the game ended, it tried to update all the records, which is why you saw WorldChamp at -9000 or so FFA points, while others were up positive in the thousands.

To fix, I did the following:
1) Increased size of rating to smallint so this won't happen again
2) I reviewed database backup for 11/14 and used this to determine that this game record had been opened and recorded 54 times!
3) I manually corrected the data by subtracting the points difference for this game times 53 (so everyone effectively only got credited once, the proper and fair amount)
4) I checked to see if anyone else had negative rating scores, and fortunately, it appears this incident was isolated to this one game.
Logged

Manager of D20Studios, LLC
WorldChamp(ELITE)
Hero Mages Elite
*
Posts: 81



View Profile
« Reply #4 on: April 03, 2015, 07:33:59 AM MT »

All you guys take this into consideration next time you want to eliminate WorldChamp first..  Grin Nothing good ever comes from that  Tongue Thank you Ross for your hard work and dedication to HeroMages, glad to see it fixed!
Logged
Scribe
Hero Mages Elite
*
Posts: 114



View Profile
« Reply #5 on: April 10, 2015, 11:28:56 AM MT »

Good job,  Ross. Thank you
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC