• dual_sport_dork 🐧🗡️@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    16 days ago

    Give that man a cigar.

    2^16 is 65,536 precisely, one less than that is the number in question. 65,535 is the maximum value of an unsigned 16 bit integer, i.e. sixteen ones in binary: 1111111111111111.

    Any nerd who has spent enough time around computers, or at least old computer games, will recognize that instantly as well as the maximum of an 8 bit integer (255) and 32 bit integer (4,294,967,295) because these are inevitably the values you see on your score/money/ammo/whatever counter when you bork your game. Deliberately or otherwise.

    • DarkSirrush
      link
      fedilink
      arrow-up
      1
      ·
      16 days ago

      Fun fact: the maximum amount of money you can hold in Maple story is actually half the 32 bit maximum, at 2,147,483,647.

      • dual_sport_dork 🐧🗡️@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        7
        ·
        16 days ago

        That means it’s being stored as a signed integer for some reason. The other half of the binary space is for the negative values, which was probably a poor choice. Unless there is a valid case when you can have negative money. Is debt a thing in Maple Story?

        • DarkSirrush
          link
          fedilink
          arrow-up
          3
          ·
          16 days ago

          Not at all, but it definitely used to get exploited a lot back in the day.

          I bet they thought using signed integers made math easier or something.