Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
new:rng_myths [2018/02/19 11:43] – korshun | new:rng_myths [2018/02/19 11:56] – korshun |
---|
====== ZDoom RNG myths ====== | ====== ZDoom RNG myths ====== |
| |
Many modders are convinced that ZDoom's [[zdoom>Random]] function is not statistically random, or returns the same sequence of random numbers in different games. As a result, some mods try to enhance the randomness by factoring in [[zdoom>Timer]] or actor positions into their custom RNG, and using it throughout the mod | Many modders are convinced that ZDoom's [[zdoom>Random]] function is not statistically random, or returns the same sequence of random numbers in different games. As a result, some mods try to enhance the randomness by creating a custom RNG that factors in [[zdoom>Timer]] or actor positions, or combines multiple calls to [[zdoom>Random]], and use it throughout the mod. |
| |
While this non-randomness of [[zdoom>Random]] was probably true previously, it is not anymore. Zandronum 2.0+ and GZDoom 1.8.6+ (as verified, likely earlier versions too) use high-quality statistically random [[wp>Mersenne Twister]] RNG and don't output the same sequence in different games or rounds. | While this non-randomness of [[zdoom>Random]] was probably true previously, it is not anymore. Zandronum 2.0+ and GZDoom 1.8.6+ (as verified, likely earlier versions too) use high-quality statistically random [[wp>Mersenne Twister]] RNG and don't output the same sequence in different games or rounds. |
| |
Therefore, "enhancing" the RNG will only likely make it **less** random in modern versions of source ports. It is recommended to remove any custom RNG code from mods. | Therefore, "enhancing" the RNG will only likely make it **less** random in modern versions of source ports. It is recommended to remove any custom RNG code from mods. |