Huge Game-Breaking Boss Exploit! (BTD6)

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 106

  • @pengasgaming1816
    @pengasgaming1816 4 месяца назад +69

    For anyone wondering why it does less damage as you level up, the number of tiers increase, increasing the overflow and adding to the negative healing value(less damage), and because level 14 just barely overflows the integer limit, it does more damage

  • @madrid_drive_enjoyer
    @madrid_drive_enjoyer 4 месяца назад +532

    People say Benjamin is the weakest hero in terms of damage, they were WRONG

    • @worminaround
      @worminaround 4 месяца назад +25

      technically, all heroes can do this so yeah he still the weakest

    • @trickeddev
      @trickeddev 4 месяца назад +9

      @@worminaround🤓

    • @trickeddev
      @trickeddev 4 месяца назад +19

      Benjamin is the 🐐

    • @bruhv3
      @bruhv3 4 месяца назад +9

      bro hacked his way into damaging lych

    • @worminaround
      @worminaround 4 месяца назад +1

      @@trickeddev thx

  • @nonamebro0032
    @nonamebro0032 4 месяца назад +131

    Ben casually doing 14 million damage and leaving:

    • @demitrischoenwald1436
      @demitrischoenwald1436 4 месяца назад +3

      It's more like, leaving, dealing 14 mil damage, coming back, stealing money, leaving, dealing 14 mil damage, and so on.

  • @CourierCat-2
    @CourierCat-2 4 месяца назад +30

    >deals 14m dmg
    > -refuses to- elaborates
    >leaves

  • @foxxbaker
    @foxxbaker 4 месяца назад +353

    So if I’m getting this right, then lunch is basically overdosing on healing
    Edit: I decided it’s funnier not to fix the autocorrect issue lol

  • @Exshem
    @Exshem 4 месяца назад +77

    This is truly a certified Mackanrules moment

  • @mrhappytroll
    @mrhappytroll 4 месяца назад +50

    its so neat to see how a bug happens for once, instead of just knowing what happens, the guy explain why it happens, even if its just a simple buffer overflow

    • @sasho_b.
      @sasho_b. 4 месяца назад +28

      Integer overflow. A buffer overflow is when you run out of memory in an array (a buffer) but you keep on writing/reading in junk memory or worse, in important memory.

    • @fusionwing4208
      @fusionwing4208 4 месяца назад +3

      And most people ignore/dont care about the intricacies of it.
      I for one am all for seeing precisely why a bug happens. Even if the reason is pretty stupid/simple. Cause lets be frank, all code is spaghetti code under the right circumstances xD

    • @sleepycat01234
      @sleepycat01234 3 месяца назад

      ​​@@fusionwing4208except for yan sim, it is alway a spaghetti code.

  • @b0bsaget007
    @b0bsaget007 4 месяца назад +8

    2:05 The LVL20 sell did less damage because of the overflow math. 21 * 144,000,000 = 3.024 billion. That number when converted to 32-bit signed int overflows to -1.27 billion, which then converts to around 12.7 million HP damage. Therefore, you get less damage from selling a LVL20 hero than selling a LVL14 hero.
    And all of this could have been avoided if the programmers used either *unsigned* integers, which have a limit of just under 4.3 billion, or *long* integers, which have a limit of over 9 *quintillion.*

    • @Ray.6406
      @Ray.6406 4 месяца назад +7

      tbf devs probably didn't think they'd use numbers that big

  • @Acro
    @Acro 4 месяца назад +7

    hahahaha. That 600% boos hp came back to bite NK in the butt.

  • @sunbleachedangel
    @sunbleachedangel 4 месяца назад +6

    Aaah, good old integer overflow

  • @The18107j
    @The18107j 4 месяца назад +41

    Benjamin DPS OP

  • @mariorox81
    @mariorox81 4 месяца назад +25

    So does this work when a hero levels up naturally? If it's like how Least Tiers does it, the tier count would only go up if you spend money on a level, which it seems was the case in this example and the others.

    • @user-to7ds6sc3p
      @user-to7ds6sc3p 4 месяца назад +20

      Least tiers counts bought tiers. Lych uses the actual tiers.

  • @HeJauxoS
    @HeJauxoS 4 месяца назад +4

    bro thought he could trick us by making it look like the sub paragon did the integer cap damage. pretty cool touch tho lol.

  • @jakubmalinowski1474
    @jakubmalinowski1474 4 месяца назад +5

    NOTE: this bug only affects well HP buffed Lych and only this boss.
    EDIT: NOTE 2: this bug can be easily fixed with other calculation system that includes brackets or replace multiplication with division. Calculus will not overflow as easy if the number is firstly divided and then multiplied.

    • @Jonas-Seiler
      @Jonas-Seiler 4 месяца назад +1

      Why would they do something so complicated, they could easily just clamp the healing amount instead (assuming they have a good reason not to just use a type supporting larger numbers there)

    • @all-starsilver1835
      @all-starsilver1835 4 месяца назад +2

      Couldn't they divide the hp amount by 100 first, then multiply the hp by tiers? That should solve the overflow issue entirely, no matter lych's HP

    • @jakubmalinowski1474
      @jakubmalinowski1474 4 месяца назад +1

      @@Jonas-Seiler
      Thats kinda also an option, but scrapping idea of different size of healing for each tower sold is... erm... unnecesarry. It works totally fine now, just there is only a need to rework heroes.
      I don't say its gonna be complicated, im saying it needs not to be as simple. As far as i understand correctly the game now counts every single level of a hero as a tier, it just needs to make the game understanding that every 4th-5th level of a hero makes the hero being a tier higher. It doesn't even need to be visually experiencable. And this can be fit in very few lines of code no matter what programming language it is.

    • @lucky_lunar
      @lucky_lunar 4 месяца назад +2

      @@Jonas-Seiler at that point why not just make healing an unsigned int so it's always positive and has double the max value

    • @maybeperhaps2788
      @maybeperhaps2788 4 месяца назад +2

      @@Jonas-Seiler I am guessing because the next signed bit is 64bit-signed , which have about 9.2x10^18, billion is about 1x10^9, thats a lot of wasted bit used to store 0 that will never be used. Reworking lych's healing makes more sense, or just dont make it 500% hp XD

  • @plushiexd
    @plushiexd 4 месяца назад +4

    the stats at the end said -700k total damage and i dont think thats normal

  • @ericchen3129
    @ericchen3129 4 месяца назад +3

    Who knew healing so much could do damage

  • @misspotato813
    @misspotato813 4 месяца назад +2

    cool... so I was trying to figure out how people were getting such low scores on the ranked leader board, glad to see the reason I could get all the way to t5 with the same number of tiers, but was completely unable to kill the last tier was bug exploiting...

  • @XxguaxinimxX.
    @XxguaxinimxX. 4 месяца назад +2

    NK: Yeah, I will be a good idea to put a boss with 600% hp!

  • @mythmakroxymore1670
    @mythmakroxymore1670 4 месяца назад +3

    *Insert monogatari tongue twister.*

  • @5gearz
    @5gearz 4 месяца назад +2

    If only I got this video while playing the actual boss

  • @TrueChaoSclx
    @TrueChaoSclx 4 месяца назад +9

    A presumably easy fix for this would be that before Lich's HP is touched, it checks the final "heal" amount - if the number is under zero (would deal damage instead), heal to full instead.

    • @jamesknapp64
      @jamesknapp64 4 месяца назад +2

      Could also take ABS of value for heal. That changes 1 bit (potentially) of the number with one check. Should see no performance changes

    • @sunbleachedangel
      @sunbleachedangel 4 месяца назад +1

      Just clamp the healing number or just make the integer 32 bit instead 16 so the max number is in the trillions

    • @leonardotrujillo8661
      @leonardotrujillo8661 4 месяца назад +1

      ​@@sunbleachedangelbtd6 already has a an integer of 32 bits lol

    • @sunbleachedangel
      @sunbleachedangel 4 месяца назад +1

      @@leonardotrujillo8661 I meant 64, my bad

  • @RonZhang
    @RonZhang 4 месяца назад +4

    Benjamin doing damage? Wow.

  • @scottc1115
    @scottc1115 4 месяца назад +1

    in the game summary it says you did -710925 damage. Which is kinda funny

  • @leroyspeelt
    @leroyspeelt 4 месяца назад +3

    Didnt know it would turn negative if you heal too much

    • @jamesknapp64
      @jamesknapp64 4 месяца назад +3

      That is an aspect of storing numbers as integers (positive or negative) and thinking they'll only be positive.

  • @JosiahBradley
    @JosiahBradley 4 месяца назад +2

    Extras secret strats!

  • @Eagleleadsmc
    @Eagleleadsmc 4 месяца назад +2

    So basically we are healing the boss so much to where it goes to less health than before 😭

    • @mothrahlurker788
      @mothrahlurker788 4 месяца назад

      No, the heal is so much that it ends up being negative. Else you could instantly kill the boss with your suggestion.

  • @Pumpnineteen
    @Pumpnineteen 4 месяца назад +6

    if you buy a hero level in least tiers, it does count as being bought a tier

    • @icenovice
      @icenovice 4 месяца назад +1

      yes, so does manually buying tiers

    • @timeflex727
      @timeflex727 4 месяца назад

      @@icenoviceliterally what he said

  • @TheHumbledButterdToast
    @TheHumbledButterdToast 4 месяца назад +1

    Who let Benjamin white cook the buffs 🔥 (I’m referencing to Walter whit in case someone has the joke fly over their head)

  • @ExTexanShorts
    @ExTexanShorts 4 месяца назад

    -710k damage is wild

  • @tayty1238
    @tayty1238 4 месяца назад +2

    here we go again

  • @Craigalicioususa
    @Craigalicioususa 4 месяца назад +2

    I got an update this morning... perhaps it got patched already. I didn't try it yet lol

  • @tj_the_Halfblood
    @tj_the_Halfblood 4 месяца назад +1

    Benjamin solos lych confirmed

  • @Not_Important75
    @Not_Important75 4 месяца назад +2

    This is cool af

  • @lightcry988
    @lightcry988 4 месяца назад +7

    lean

  • @lubiejazz2220
    @lubiejazz2220 4 месяца назад +1

    Where are the streams mr Isab

  • @shylo3579
    @shylo3579 4 месяца назад

    how exactly would they patch this? only way i could think is by nerfing licht to get around hitting the integer limit

    • @rallvegd
      @rallvegd 4 месяца назад +2

      Easiest way would be to change the integer from 32 bit to 64 bit, which would increase the max healing from 2 billion to 9 quintillion. Alternatively they could make the integer an unsigned int, which would double the max healing to 4 billion while also making it impossible for the healing value to be negative if it somehow overflowed anyway (it would loop around to 0 instead).

  • @sprigtherecluse6741
    @sprigtherecluse6741 4 месяца назад +2

    so does this also only work on t5 as well? since the max health of the boss matters

    • @Rebear.1
      @Rebear.1 4 месяца назад +1

      yeah, only on t5 elite

  • @spidre-nw7od
    @spidre-nw7od 4 месяца назад +1

    How can they patch it without changing Lych entirely

    • @all-starsilver1835
      @all-starsilver1835 4 месяца назад +1

      They could divide the HP by 100 first, then multiply it by the number of tiers

    • @olixx1213
      @olixx1213 4 месяца назад

      Easy patch
      Just check if the number is negative before healing

    • @all-starsilver1835
      @all-starsilver1835 4 месяца назад +3

      @@olixx1213 That wouldn't let Lych calculate how much it's supposed to heal, though
      That would mean it would heal nothing, which is less egregious than taking damage, but still not intended behavior

    • @rallvegd
      @rallvegd 4 месяца назад +1

      Divide the HP by 100 first, or just change the heal value from 32 bit to 64 bit.
      Edit: Generally though, you want to perform multiplication BEFORE division if possible, in order to mitigate any floating point rounding errors.

    • @all-starsilver1835
      @all-starsilver1835 4 месяца назад

      Any boss HP is divisible by 100 tho, so there should be no problems

  • @lolboysorrow
    @lolboysorrow 4 месяца назад

    Is that how we get owned in ranked?

  • @erikburns292
    @erikburns292 4 месяца назад

    40mins, huh?

  • @LuckyTwoo
    @LuckyTwoo 4 месяца назад

    loving kids from saying second

    • @ExzaktVid
      @ExzaktVid 4 месяца назад +1

      Comment understand not can your I

  • @bluenightrblx
    @bluenightrblx 4 месяца назад +1

    tack shooter btd1 better

  • @termonic2542
    @termonic2542 4 месяца назад

    Cmon Isab why do you always wait for the event to finish before posting these videos?

  • @nninja_catt
    @nninja_catt 4 месяца назад +12

    stopping kids from saying first

  • @julianc6954
    @julianc6954 4 месяца назад +1

    First