06-30-2003, 03:27 PM
'Lo Baajikill,
First off, thanks Ruvanal - that helps quite a bit.
Do you know what the overflow point is? Assuming the golem life total is stored in an integer, 8 bits would get you 127 (signed) or 255 (unsigned) life, which is clearly too small. 16 bits would get you 32,767 or 65,535 life, which seems quite large, even with OS and BO factored in. From a programming perspective, I don't really see any reason to use anything except a 16 bit (or 32 bit) unsigned integer if it is available. No one is so desperate to save space as to manipulate individual bits on a game like this anymore.
The Tao of Poison on diabloii.net makes reference to 'bite damage' - a reference to the fact that there is apparently 1 byte = 256 subdivisions of a hit point. This suggests to me that life would be stored in a separate 16 bit unsigned int or the whole thing would be stored in a 32 bit int and the low order byte shifted off to find the 'bite' total leaving 24 bits (probably unsigned). But that's back to manipulating individual bits, and I don't know why they would be doing that.
So what the heck did the programmers do? Are my estimates off? Is the golem life going to be pushed over at least the 32,000 mark in players 8/ hell / BO/ Oak Sage situations? Is there some lower, hard coded cap imposed by a silly programmer somewhere along the line?
Thanks again - this has all been quite helpful.
-V-
First off, thanks Ruvanal - that helps quite a bit.
Quote:BO/Oak can easily push your golem to the point that its life overflows.
Do you know what the overflow point is? Assuming the golem life total is stored in an integer, 8 bits would get you 127 (signed) or 255 (unsigned) life, which is clearly too small. 16 bits would get you 32,767 or 65,535 life, which seems quite large, even with OS and BO factored in. From a programming perspective, I don't really see any reason to use anything except a 16 bit (or 32 bit) unsigned integer if it is available. No one is so desperate to save space as to manipulate individual bits on a game like this anymore.
The Tao of Poison on diabloii.net makes reference to 'bite damage' - a reference to the fact that there is apparently 1 byte = 256 subdivisions of a hit point. This suggests to me that life would be stored in a separate 16 bit unsigned int or the whole thing would be stored in a 32 bit int and the low order byte shifted off to find the 'bite' total leaving 24 bits (probably unsigned). But that's back to manipulating individual bits, and I don't know why they would be doing that.
So what the heck did the programmers do? Are my estimates off? Is the golem life going to be pushed over at least the 32,000 mark in players 8/ hell / BO/ Oak Sage situations? Is there some lower, hard coded cap imposed by a silly programmer somewhere along the line?
Thanks again - this has all been quite helpful.
-V-