Random Has Non-Deterministic Behavior

Reporter: RobertBColton  |  Status: open  |  Last Modified: July 20, 2018, 07:10:17 AM
Ok, so while writing some drawing tests with a fixed random seed, I ran into this problem.

random_set_seed(236732942);
for (i = 0; i < 3; i += 1) {
    show_message(string(irandom(10)));
}

This always produces 3, 5, 9 in GM8 for me, but in ENIGMA the second two numbers are not correct. This has to do with the fact that the next seed chosen by ENIGMA is not based on the current seed, making the behavior totally non-deterministic.

I get the same results in GMSv1.4 except the numbers are always 1, 8, 8.

@RemoveRusky correctly found the issue for me, which is here:

enigma::Random_Seed = mtrandom32();
Please sign in to post comments, or you can view this issue on GitHub.