I’ve heard somewhere that math.random function can return different values on different platforms with same seed, is here any workaround or lib recommendations?
1 Like
While it may generally be true that they differ given Lua versus LuaJIT and different versions, it isn’t true in our version.
We implement our own math.random() which calls our own dmMath::Rand() function.
That code isn’t complex, and while we only have a small unit test for it, we run it on all desktops, web, android and consoles. So if you do find a difference between platforms, let us know and provide a repro case.
5 Likes