The Gold Cap – A Detailed Explanation
There’s a lot of talk about the gold cap in World of Warcraft. Currently, you can not have more than 214,748g 36s 47c. Since making gold is like a mini-game within the game, hitting the gold cap is a good way to measure “beating” this mini-game.
I’ve heard the reason there’s a gold cap is a “programming thing”. Yes, it is, but why? Let me explain that to you.
When you’re creating a program, each variable you have has a data type. In this case, the amount of gold you have, is an integer. An integer is limited to numbers between -2,147,483,648 to 2,147,483,647. It’s limited to these numbers because an integer is stored as 4 bytes. Since each byte has 8 bits each, you’re limited to 2(8×4)-1. We have to subtract 1 here because 1 bit is used to determine the sign of the number (whether it’s positive of negative).
One way Blizzard could raise the gold cap, would be to use an unsigned integer, since it’s impossible to have a negative amount of gold, the extra bit to determine the sign of the number is simply a waste. Utilizing this extra bit would raise the gold cap to 429,496g 72s 95c. While this is still limiting, it would be the easiest change for Blizzard to make without having to increase the size of their databases.