Saw this on my Facebook memories today

Actually 255 = 256 because 0 is counted as 1 depending on what you're doing! That's if you're storing your data in a byte, it goes from 0 to 255. Lots of older games have glitches where if you get too many points you go back down to zero.

But even in the case of number wrap 0 would be 1! It's really annoying at first but becomes 2nd nature.

If you store in an integer it wraps around after you exceed 32767 to -32768. Or if an unsigned integer it doesn't let you use negative numbers and uses the extra space for positives which means the range is between 0 and 65535.

That would be pretty depressing if that happened in a game because you usually can't go backwards either because there's no mechanic for taking away points and they usually don't allow it either. That's all 8 and 16 bit stuff though. You won't have that trouble with modern games unless you get over 4,000,000 and something points or lives I think. And hopefully they check for it anyway. I feel like programming now.

/r/sadcringe Thread Parent Link - i.redd.it