2 ms·
> The "right" solution you describe sounds overcomplicated and error-prone It's not particularly. At program start-up, you seed the original PRNG. Then, you ge
by kibwen 3y ago
> The "right" solution you describe sounds overcomplicated and error-prone
It's not particularly. At program start-up, you seed the original PRNG. Then, you generate N numbers from the original PRNG and use those to seed N other PRNGs, then throw away the original PRNG. You don't need to think carefully about domains, you just create a new PRNG for everything you need a random number for. This makes your game easier to debug in a deterministic way, because now reproducing the behavior of one specific action that involves randomness no longer depends on every other action that involves randomness.