Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
There will obviously be an incriment setting for it, as you would otherwise have near meaningless values.
SC2 uses floats, their precision I do not know. They however definatly do have a precision so there is no infinite number of reals. Additionally the range of numbers supported by floats vary with there being huge incriments at large numbers.
real numbers associated with game time are rounded to the nearest multiple of 0.0625
some reals in the data editor are also rounded to 1/16 or 1/32 increments as well. you can see some values when you enter 1000, it rounds it to like 999.94
I would imagine they used floats as those are what direct X and such interfaces use and also modern hardware actually supports physical structures to speed up their computation.
They might use binary decimalls as well, which would explain the funny incriment (caused by maths applied) but only a reverse engineering of the actual game would reveal that (which violates TOU).
I'm pretty sure they use 32 bit floats for "fixed" variables. I mean forcing us to use 64 bit variables would be kind of silly, and the memory allocation problem (the 2^21 bit limit) seems to be the same regardless of if you are using int vs fixed, so it suggests they use the same storage capacity ie 4 bytes.
Just checked, the value range is +-524288 (19+1 bits), and the lowest precision is 0,000244.... (12 bits)... added together: 32 bits. So it really is fixed.
I am guessing the variebles used for triggers are probably floats as such a restrictive range would cause problems other wise. Internal mecahnics it should be fine using fixed points.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.