08-16-2010, 02:24 PM
Another bug i discovered in the latest dev version is that RANDOMIZE does not change the seed.
I got exactly the same RND numbers with RANDOMIZE 0 as with RANDOMIZE 1 or even RANDOMIZE (without number, after a pause 0 to avoid the fact that the emulator always starts with frame count 0 and uses it as Seed.
Here is the evidence:
There is a way around it:
This does not rely on RANDOMIZE, it just copies two bytes from frames sysvar to seed sysvar, and gives you every time you start a program, new RND sequence (After a PAUSE 0 or selecting controls).
I got exactly the same RND numbers with RANDOMIZE 0 as with RANDOMIZE 1 or even RANDOMIZE (without number, after a pause 0 to avoid the fact that the emulator always starts with frame count 0 and uses it as Seed.
Here is the evidence:
Code:
print "Actual Seed: ";peek (uinteger,23670)
randomize 45
print "Seed after Random 45: ";peek (uinteger,23670)
randomize 37
print "Seed after Random 37: ";peek (uinteger,23670)
randomize
print "Randomized seed: ";peek (uinteger,23670)
Code:
poke uinteger 23670,peek (uinteger,23672)
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!