Quote: "ie.
+ Code Snippet
a = rnd(99)+1
b = rnd(98)+1
c = rnd(97)+1
d = rnd(96)+1
if b >= a then inc b
if c >= a then inc c
if d >= a then inc d
if c >= b then inc c
if d >= b then inc d
if d >= c then inc d"
This one doesn't seem right to me. Firstly, you are more likely to pick number 1 than number 100 - 100 is only in one of the four selections whereas 1 is in all of them.
Secondly you have more chance of getting (for example) 51 than any other number if 50 has already been chosen, it looks like you are 4 times more likely to get a+1 than any other number, 3 times more likely to get b+1 and twice as likely to get c+1.
Quote: "I tested this in AppGameKit and when I used "setRandomSeed(timer())" I got repetative results almost every time..."
In AppGameKit, Timer() is the time since the start of the game, so it's extremely likely you'll get repetitive results if you randomise as you start, and reasonably likely if you randomise when the user plays the first game (if they press start as soon as its available).
In DBP, Timer() is based on the system clock, so it's much harder if not virtually impossible to get the same seed. Additionally, if you randomise more than once in your game, it becomes more unpredictable.
Quote: "I read a discussion on this between Green Gandalf and IanM a while ago and it seems you are always best to NOT use "setRandomSeed" or "randomise" unless you want repetative results. If you set a seed no matter what the source it makes it repetative."
I can't get my head around this one. As mentioned above if you want to break the preset sequences, then surely you need to randomise at numerous intervals, otherwise your program reverts to the established patterns over time.