R07: Repeatable Random Numbers
- Due Oct 17, 2019 at 8am
- Points 4
- Questions 4
- Available until Dec 9, 2019 at 8am
- Time Limit None
Instructions
Rune Skovbo Johansen Links to an external site. is a Creative Programmer at Unity Technologies in Copenhagen. 15 years ago, he was just finishing his formal education in Multimedia and Game Programming before starting a career that passed through jobs with titles like "web developer" and "data processing executive" on the way to "game programmer" and later "creative programmer". Maybe you'll have a similar career trajectory?
Read his Gamasutra article A Primer on Repeatable Random Numbers Links to an external site.. Amongst other things, the article discusses a not particularly useful hash function for procedural content generation called PcgHash -- due to your very own Adam Smith. This hash shouldn't be confused with the more recent, completely different, and actually useful PCG family of hash functions (where this time PCG stands for "permuted congruential generator"): http://www.pcg-random.org/ Links to an external site.Nevertheless, there is significant overlap in the motivations for these two "pcg hash" things: they should execute quickly (so they can be called many many times per frame), allow you to jump to the desired value in constant time (to support generating pseudo-infinite worlds), and produce output numbers with many random-like properties (so that they feel random for the audience).