The GMS Randomize affects the values created by ds_list_shuffle (they are random). Enigma randomize does not affect them. We always get the same value.
Example (if you have GMS and Enigma):
It directly uses the C++ shuffle:
Thanks for reply
Unfortunately I am not a programmer in C ++, I can not verify the correctness of the code - I just noticed that it is working badly.
I know some non-optimal way to solve this problem.
But maybe someday someone will fix it and that's why I reported it ;)
Just to provide clarification to this ticket, the unit test is:
randomize(); global.player1_deck = ds_list_create(); ds_list_add(global.player1_deck,1); ds_list_add(global.player1_deck,2); ds_list_add(global.player1_deck,3); ds_list_add(global.player1_deck,4); ds_list_add(global.player1_deck,5); ds_list_shuffle(global.player1_deck);
The GameMaker: Studio documentation does make this clear that
randomize() should be called during testing and debugging:
I don't know what the behavior, in regards to
randomize(), was in previous GameMaker versions:
ds_list_shuffle(...) is clearly not randomizing at all in ENIGMA.
@fervi Thanks, this is actually an easy one to fix with your reproducible.
Issue is, source I linked above
random_shuffle is deprecated in C++14 and also we were never calling the random function for it. So not only does the random need fixed, it also needs to use
I'll forward this to @JoshDreamland and take a look at it later.
Edit: Our Wiki should also clarify this behavior.