Team Phrogram,
I do not know if this helps (or hurts) but I re-wrote a random number generator for Boo! from a c-based algorithm that I found on the Internet. It is complete with my assessment at the time that it is not a very good quality routine (2-Due-Low means it is on my to-do list and is low priority). I ran it through a loop and plotted the points. It *seemed* fairly distributed at the time to me - visually. But, I have wanted to find and hack a better one. Maybe somebody can start with this code and either prove it is high-quality or make improvements to it... and share back to the rest of us.
Function RandomResult ( ) As Integer
// Return a pseudo random integer between 1 and 100.
// 2-Due-Low: It seems to work... but it is not pretty (find a better non-C based code sample)
// Int rand()
// {
// random_seed = random_seed * 1103515245 +12345;
// Return (unsigned Int)(random_seed / 65536) % 32768;
// }
Define Result As Integer
GameRandomSeed = (GameRandomSeed * 1103515245) + 12345
Result = abs(GameRandomSeed / 65536)
Result = (Result / 328) + 1
Return Result
End Function
ChristmasWhistler
http://www.christmaswhistler.com(\ _/)
(- . -) This is bunneh. Copy and paste him to
(")-(") your signature, so that he may gain popularity and eventually rule the world