I’m dabbling with making my own Match 3 game, and I’ve pilfered Britzl’s lovely emthree library to make it with, however I noticed that each time I load my game it starts with the exact same layout. I then took a look at the Ocean Commotion demo and noticed it did the exact same thing. Is there a way to make the board generate layouts from a random/pseudorandom seed so we don’t start with the same layout each time?
Note about math.randomseed() if you set it to the same value it will generate the same values in the same order every time. That’s how PRNG works. Setting the seed to time makes it unique, if 2 players started to play at the very exact time they would have the same “random” experience. It’s how Minecraft worlds can generate the same way too for everyone who uses the same seed, generation is done through stepped RNG generation.
You could modify Emthree to use PCG Random Number Generator instead of the builtin math.random() to improve random quality.