2.147 billion score and 32 bit int overflow possible with the new scoring system

SeanPoeSeanPoe Member, Early Access
edited April 20 in Bugs & Technical Issues
With the new multiplier-based score system it is now theoretically possible to exceed 2.147 billion score through legitimate means (i.e., without using any bugs) which will result in the number exceeding the 32 bit int maximum value and flipping to a negative number (-2.147 billion) before incrementing back up again.  This is most likely only possible in 3-man groups and would only require wave 25 on an endless map with zero deaths and an 'old' score of 63 million (and some 3-man groups were even getting over 150 mil before 2.0, so technically 5.1 bil is even possible in 2.0).  This should probably be looked at and remedied before it's an obvious problem. 

The easiest way to fix this problem would be to reduce the score value of kills (and combo kills) by ~66% but that would require another leaderboard reset.  Since time and coin are no longer part of the score calculation, reducing the score value of minion kills would have no impact on the ratio of score contribution (since the score is 100% based on kills now with an end-of-game multiplier applied to that kill score) other than reducing the overall size of the number.  With a ~66% reduction that would put the theoretical max at ~1.650 bil.
«1

Comments

  • TimeMasterTimeMaster Member, Early Access
    I tried warning @ShadeDev about this too :P

    Did myself some theoretical calculations before too:


  • SeanPoeSeanPoe Member, Early Access
    edited April 21
    I actually just realized there's another problem that is making this issue worse and more obvious: the bonus score for each additional endless wave is completely broken.  It's supposed to be an additive 15% increase in score per wave over 5 ((wave number - 5)*0.15+1)  but instead it's a multiplicative bonus that compounds per wave over 5 [1.15^(wave number + 1 - 5)]. So, for example, getting to wave 25 would multiply the total kill score by ~19 (1.15^(25 + 1 - 5)) instead of 4 ((25 - 5)*0.15+1). 

    Even if the endless multiplier worked correctly it would still be possible for a 3-man group to exceed the maximum 32 bit int value by getting to around wave 40 with no deaths and an 'old' (pre-2.0) score of ~200 mil (which was possible).  So there's two distinctively different problems with the scoring system: wrong endless multiplier and the possibility to get an int overflow (even if the multiplier was working as intended). 





    Post edited by SeanPoe on
  • ShadeDevShadeDev Member, Robot Entertainment, Early Access, Apprentice Founder, Featured Developer
    It's not supposed to be additive, it's supposed to be exponential.
    Doug Houserman
    Robot Entertainment | Lead Balance Designer
  • SeanPoeSeanPoe Member, Early Access
    edited April 21
    But what about the integer overflow problem?  Most 3-man groups that seriously try for score will be able to exceed a 2.147 billion score.  With an exponential score bonus you would only need to get to wave 35-42 with very low average combos (only 10-12x) and a good combo group could hit the integer max with as little as 18 waves (with 20x average combo). Even a solo player (and definitely a 2-man group) will run into integer overflow problems on the easier endless maps (the baths and throne room). 
  • nthornnthorn Member
    edited April 21
    probably not an issue. there are a few ways to get around overflow and still use huge numbers.
  • SeanPoeSeanPoe Member, Early Access
    In the past there's been ways to get over 2.147 billion score (as well as 2.147 billion hero or trap damage) and it has always resulted in overflow. 
  • nthornnthorn Member
    okay then there is a problem. i forgot about the people with those high scores a couple patches back
  • JuicyJuicy Member, Master Founder, Early Access
    :). Programatically though, that could have been fixed.
    Wiki Contributor: Juicearific - Got a wiki suggestion? Let me know.
    Welcome to Juicy's Midnight Assassination Service. You grab em, I'll stab em.
  • SeanPoeSeanPoe Member, Early Access
    edited April 24
    Here's proof that it's possible for even a solo player to hit the integer max value.  I could have kept going for at least 1-2 more waves but decided to lose on purpose before getting an integer overflow since my last wave change gave me around 200 mil score; another wave would have put me at around 2.4bil.  This was also only my first try (and only second time ever on Endless Baths), I brought the wrong traps and traits and made a lot of build mistakes, but even with all those problems I could have hit the integer max, which really shows that the current scoring system needs some changes OR there needs to be a change to how overflow is handled.   


    Post edited by SeanPoe on
  • SchaoxSchaox Member
    edited April 24
    Btw, the dev could change and get only positive number so the limit could be +4.294 billions.

    I think the score now is calculated with floating number and cut to be displayed.

    For example, the score can add 1.5 *3 = 4.5, you will see 4.
  • You call that proof.

    If you can do it, do it. Stop messing around with your theoretical calculations. And make some proof. 
    Keep it secret, Keep it safe.
    New? Here are some Game Tipz.
  • TimeMasterTimeMaster Member, Early Access
    You call that proof.

    If you can do it, do it. Stop messing around with your theoretical calculations. And make some proof. 
    It's not hard to do, just that if you do it, the display goes to 0. So there isn't much left to show when achieved :D
  • You call that proof.

    If you can do it, do it. Stop messing around with your theoretical calculations. And make some proof. 
    It's not hard to do, just that if you do it, the display goes to 0. So there isn't much left to show when achieved :D
    Looking forward to it :lol:
    Keep it secret, Keep it safe.
    New? Here are some Game Tipz.
  • SeanPoeSeanPoe Member, Early Access
    edited April 24
    The devs would know whether or not they changed the number data type from a 32 bit int to something else (such as float) in patch 2.0.  As I said earlier, I know for a fact that the score as well as most of the stats on the post-game stat screen used to be stored using a 32 bit int.  Here's proof of that (screenshot from 1.7):



     I showed that it's possible for even a solo player to hit 2.147 billion in 2.0. Now also keep in mind that a 2-3 man groups could do 10-20 times that score because of how the combo scoring system works.  That means that a 3 man group could easily exceed 2.147 billion on every single endless map. 

    That's all i need to provide to the devs:  Proof that it's possible to go over 2.147.  They already know if that will result in a overflow, i don't need to prove that too. 

  • I think it would be better if you add the wave bonus in endless matches instead of stacking it. As a result, the max score  remains out of reach of the players / groups.
  • gotta love that 32bit integer
  • JuicyJuicy Member, Master Founder, Early Access
    Good work, Sean.
    Wiki Contributor: Juicearific - Got a wiki suggestion? Let me know.
    Welcome to Juicy's Midnight Assassination Service. You grab em, I'll stab em.
  • WinwinWinwin Member, Moderator, Robot Entertainment
    @SeanPoe - Thanks for reporting this to us. Our team is investigating it. :)
  • elploukelplouk Member
    How do you score so much ?
«1
Sign In or Register to comment.