4 ms·
Speculating: Perhaps a feature for automated regression testing? Start the game with the "cursed" seed, run your script of inputs and compare the outputs agains
by blackboxlogic 5y ago
Speculating: Perhaps a feature for automated regression testing? Start the game with the "cursed" seed, run your script of inputs and compare the outputs against the results of your last production release.
Versus the normal RNG, where a game difference which touches the RNG would alter ALL following output, hiding later game differences.
- flatiron 5y agomy thought exactly, its a feature not a bug. a way for a unit test to possibly "play" the game with RNG effectively "disabled"
- pcwalton 5y agoThat's far too subtle. If a developer were going to add a debugging mode like that, they'd just add a flag that's checked in the function and makes it return a constant.
- _Microft 5y agoThat was my thought as well. Why bother with finding a fix point of your PRNG (and messing up its properties in the process) when one could use something like #ifdef ... return 4; instead.
- xyzzyz 5y agoIt would be much, much simpler and much more robust to just have a flag that when set, makes RNG returns the same number, instead of depending on some very obscure behavior of specific hard coded constants chosen.