This is the random number generator used in the original release of Doom (the 1993 video game).
I was leafing through the source code and stumbled upon "random.c"
I found it amusing to see how they generated random integers; basically, they have a hardcoded array of "random" values, and whenever the game requires a new random int, it will return the element at the array index and increment the index by 1.
1 comment
[ 5.1 ms ] story [ 9.2 ms ] threadI was leafing through the source code and stumbled upon "random.c"
I found it amusing to see how they generated random integers; basically, they have a hardcoded array of "random" values, and whenever the game requires a new random int, it will return the element at the array index and increment the index by 1.