GMS 2 Random_Set_Seed() seems different for GMS 2 and no longer consistent between platforms.

RyanC

Member
I've just had to update my app to support 64 bit so I purchased GMS 2 and imported my game.

Within a few hours I had it running on Android but now my game is totally different.

I spent many days selecting random seeds that would generate levels and nearly 100 of them were tested which took weeks.

I've also noticed that GMS2 is not consistent between Windows and Android regarding the random seed.
Does anyone know how to make the random seed the same as GMS1?

Any help greatly appreciated!
 
I can't answer the GMS1/GMS2 random_set_seed question, but for the different platforms the manual does say this:
NOTE:While this seed will give consistent results on each target platform, results may vary between platforms due to the different way each target works.
So there is most likely going to be differences between platforms.
 

RyanC

Member
I can't answer the GMS1/GMS2 random_set_seed question, but for the different platforms the manual does say this:

So there is most likely going to be differences between platforms.
Thanks

I've been testing the game for about 1 year and it's been the same on Windows and hundreds of Android phones on different OS versions, and even emulators.

The minute I run it through GMS 2 it's different. Obviously Yoyo changed something.
 

rIKmAN

Member
No, it's definitely different in GMS2, that's why I created this post. Anyone know how to change it back?
Just because it gave the same results across targets before, doesn't mean you can deny that it literally says in the manual that results may vary across targets.
There is nothing to change back to - it's expected behaviour as per the manual definition for both 1.4 and 2.x.

Maybe get in touch with YYG and explain the issue, they might be able to give you further details on any changes made regarding this between 1.4 and 2.x which may help you generate similar seeds if that is possible.
 
G

Guest

Guest
Are you using game_restart()? There was a bug with random_set_seed not working properly with game_restart()... I thought it was eventually fixed, but maybe I'm wrong, it wasn't, or you're not using the fixed version of the runner.
 

RyanC

Member
I was using action_if_dice() and I think GMS2 uses some kind of compatibility scripts on this now.

Not sure if I can find out the original random code for action_if_dice() and re-implement it to save my game.
 

rIKmAN

Member
I was using action_if_dice() and I think GMS2 uses some kind of compatibility scripts on this now.

Not sure if I can find out the original random code for action_if_dice() and re-implement it to save my game.
Just did a quick Google for you and found this on reddit
From FrostyCat on the forums:
"The equivalent action is the "If Expression" action with the condition random(sides) < 1 (replace sides with the number of sides)."
Not sure if it will work for you, but you never know!
 
Top