I have been making a map selecting script but I noticed that some maps may be repeated more than other maps and I am using math.random() for this function.
I thought putting the map names in table and checking if the name is in table to decide if to load in the map or choose new one but I would still would love to hear your ideas!
Random is perfect for getting random values since it’s built with the use of seeds so the same map won’t get selected more than the others as easily as math.random().
All random number generators are built using seeds. The only thing that was changed is the algorithm as it produced poor pseudorandom numbers.
@fungamer153 The only issue I can think of is that you are using math.random() elsewhere in your game and math.random() is a shared random object. Put simply you will not get a fair distribution between map selection because calling math.random() changes its internal state which is then used to create the next pseudorandom number.