- Joined
- Jul 10, 2007
- Messages
- 6,306
Well, after some testing in wc3, I've so far disproven two myths.
Myth Number One: The Thread Limit of Warcraft 3
Myth Number Two: String Leaks
Myth Number Three: Using Index 0 and 8192 in any given array
I shall be back with more myths and the answer to Myth Number 3!
-----------------
If anyone knows of any other myths that they have so called facts that they have doubts about, simply PM me and I will look into the matter.
Myth Number One: The Thread Limit of Warcraft 3
According to many, the warcraft 3 thread limit is 72. This means that each player gets 6 threads to work off of. This is completely false. The actual thread limit is unlimited.
Myth Number Two: String Leaks
The current accepted fact by JASS veterans is that whenever a string is used, it causes a permanent leak in warcraft 3 that cannot be removed. Even by nulling the string, the leak is not removed. This is due to a mistake on the blizzard developer's end.
This myth is half true. While strings do cause permanent leaks, these leaks are not stored in the game cache, meaning they will not cause your game to lag at all. Instead, they are stored on your computer's cache. These strings will not cause black screens in your map etc. Now, if you do use enough values, wc3 will crash after using about 712 megs of memory. This value was achieved when there was still an incredible amount of room left on the computer system's cache, still more than enough ram and vram, etc.
Now, the common mistake is mis-understanding how wc3 deals with strings. First, you need to understand that wc3 stores all data in an 8k storage area. You can easily see this with arrays (8192 limit). When you go above the limit, data isn't stored and you simply recieve empty variables (.....)
Now when you go above the 8k limit, it'll slow down drastically because the next largest storage area is either 2.12 billion or 2.17 billion for an array. Now don't worry, it won't stay slow. Remember, the strings transfer over to your computer's cache asap, so it'll go back down to 8k.
This doesn't resolve people who use the game cache though. This is completely different. The speed of the game cache is not a resultant of string usage, it's a resultant of using the game cache itself. It simply wasn't designed for speed, so a system running off of the game cache is not recommended at all.
Myth Number Three: Using Index 0 and 8192 in any given array
Most veteran JASS Programmers stay away from index 8192 in an array. Why? Because it's said to corrupt saved game files. Now, from reason and logic, I've come up with a hypothesis that runs off of the fact that wc3 only has an 8k storage capacity. This means, when you use index 0, the actual storage capacity goes from 0 to 8191. If you weren't to use 0, it should go from 1 to 8192. 8192 is set as a max in GUI because the developer's didn't expect beginners to use 0.
I'm going to be looking into this myth and I will come back with the truth soon. According to the myth, this shouldn't mess up gameplay at all. It only has to do with corrupted saved game files. I believe the only thing that would cause this is using index 0 and 8192 if this really happened. But I don't think this myth is a true one.
I shall be back with more myths and the answer to Myth Number 3!
-----------------
If anyone knows of any other myths that they have so called facts that they have doubts about, simply PM me and I will look into the matter.
Last edited: