I was able to guess that it was the Mario game (but I was unsure since this is HN not gamefaqs), but I'd think there are probably other acronyms that people here might jump to - I think the acronym should probably be expanded in the title.
I am curious what went wrong during development here.<p>Was it an accident? Did someone think that it would be a waste to throw away all these fine higher bits and just did <i>anything</i> with them?<p>(It feels a bit like a self-designed crypto algorithm when someone adds complexity because that's sure better than not, isn't it?)<p>They might not have been too familiar with linear congruential generators (LCG) because then they would have known that casting the result to an unsigned 32bit integer was not an accident but the modulus operation of the LCG (here: "mod 2^32"). See [0] for details.<p>[0] <a href="https://en.wikipedia.org/wiki/Linear_congruential_generator" rel="nofollow">https://en.wikipedia.org/wiki/Linear_congruential_generator</a>
Am I having a moment or is the math off?<p>> Given a random starting seed, rand_nsmb will repeat an output after 1,820,529 calls, on average.<p>> Longest cycle: 1 cycle of length 1,708,724
The article mentions that the seeding is sufficiently random so to make it unlikely to at the RNG will get fixed, but it would be cool to see more details about how you might be able to guarantee that seed so you can speed run or TAS the game.