How Mario 64 creates pseudorandom numbers
Published: Feb 8 2017
| This
video by Mario 64 expert PannnenKoek explains, simply and cleanly, how the
game produces random numbers, using a means called a linear shift
register. It is an excellent example
of how such values are created in production software. Mario 64 is an action game in which randomness does not typically play a huge role, so it doesn't require a "strong" source of randomness, or a large period, to provide effectively varied values. It performs its creation of "pseudorandom" values using a means that takes a seed value, performs a few elementary mathematical and logical operations to it, returns the value to the object that needs it, then stores the value as the new seed. The implications of this system are that random events in the game tend to follow cycles, that generally aren't noticeable because of varying numbers of objects seeking random numbers, and because the period (the time between repeats) is long enough to not be noticed (often from 7 to 20 minutes). |
◆ You May Also Like
Busting Tesla Myths: Why EVs Crush the Competition
David Nehdar and Lacey Chabert Marriage
The 2026 Stock Market May Be Defined by a Few Key Event...
From Tragedy to Multi-Generational Advocacy: How John W...
Berkshire Hathaway’s $1.6B Bet Vindicates Bullish Cal...
Unlocking Fuller, Healthier Hair: Why Nutrafol Deserves...
Why Serious Investors Subscribe to Tom Lee’s FS Insig...
IWM and the coming-rate-cut playbook: why small caps ca...