Log In  

I'm trying to understand PICO-8's method of NOT seeding a random number, that is, I want to return back to the original seed after I have seeded a number

cls()
z=rnd()
srand(1)
?""
?"forced seed"
?rnd()
?rnd()
?""
?"reset to random seed"
srand(z)
?rnd()
?rnd()

The only way I know how to do it is this. Get a random number to begin with. Seed the number I want, get the values for this forced seed, then return back by seeding with the initial random number. But isn't there a way to reset the SRAND itself ?

In Blitz for instance, you seed (-1) to return it back to normal non-seeded random numbers, but that does not work here.

P#66228 2019-07-31 00:44 ( Edited 2019-07-31 00:49)


[Please log in to post a comment]