I am not sure from which iOS version this begins, my iOS version is 5.1.1.
I remember it produce different number when my device was 4.*.
However,just now,I found it always produce the same sequences of number during each application lifetime,
for example,if it produces 1, 2, 3,it will still produces 1,2,3 when the app startup next time.
And it produce different number when run in the player both on mac and device.
I almost got crazy until I add math.randomseed(os.time()) when the application startup.
Comments
However it CAN be useful to seed the generator with a specific value so you can generate the same sequence over and over (especially if your procedurally generating content) - however as you've found out, the results of the function can't be guaranteed from OS version to OS version and if you were going to be basing any elements of your game / gameplay on these values then you'd really need to make your own psuedo random sequence generator so you can be sure the results are consistent across all platforms (and OS versions).
Good find!
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
My apps: http://www.yummyyellow.com
interesting...
www.tntengine.com
Likes: avo
Regards,
-Brendan