So I am making a game in which I use math.randomseed() to generate levels randomly, but that are the same through each play. This saves me the time of creating levels by hand as long as my level generation algorithm works fine, which it does. However, my levels generate completely differently on Android and the Windows simulator using the same seed.
I Googled the issue and found this on the Beer SDK forums:
http://forums.coronalabs.com/topic/33117-android-mathrandomseed-results-different-from-ios-and-simulator/Does anyone know a similar workaround for Gideros?
Comments
The random number generator is platform dependent. But you can use a good quality random number generator like Mersenne twister. So that you can get both a platform independent and higher-quality pseudorandom generator.
And https://love2d.org/forums/viewtopic.php?f=5&t=3424 has a pure Lua Mersenne twister.
Likes: hgvyas123
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
Likes: ar2rsawseen
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova