Hey. I am writing a piece of code to randomly generate levels for a game I am doing. The code works by going to each stage, generating a load of random numbers to work out what happens, then does the exact same set of numbers for the next stage etc. What I found was similar levels seemed to bunch together. So say there were only 10 combinations (there is actually loads more than that). This is something like how they would come out.
1,1,1,4,4,4,4,3,3,3,2,2,2,5,5,5, etc
Note that none of the levels generated (there are 100) ever turn out *exactly* the same but they seem similar.
The entire set of levels is genrated in about 2 seconds. I seeded the random numbers on millisecs(). Anyone have any ideas why this is happening and how I could get around it?
(I have tried putting wait commands in between each number but either the program would take days to complete, or it crashes, presumerly because the wait commands use such tiny units of time.)
Thanks
1,1,1,4,4,4,4,3,3,3,2,2,2,5,5,5, etc
Note that none of the levels generated (there are 100) ever turn out *exactly* the same but they seem similar.
The entire set of levels is genrated in about 2 seconds. I seeded the random numbers on millisecs(). Anyone have any ideas why this is happening and how I could get around it?
(I have tried putting wait commands in between each number but either the program would take days to complete, or it crashes, presumerly because the wait commands use such tiny units of time.)
Thanks