[haXe] cross-platform pseudorandom numbers
Nicolas Cannasse
ncannasse at motion-twin.com
Wed Jul 4 09:39:45 CEST 2007
jhofmann at 321f.net a écrit :
> For my current project, I will need a way to generate pseudorandom numbers
> in pure haXe. The project is a Flash game, which records the game and then
> uploads it to a NekoVM server: the server replays the game and validates
> the score to prevent hacking the scoreboard. The existing standard library
> is not good enough for this as it does not allow me to guarantee the
> predictability of gameplay - the RNG on different platforms varies.
>
> Has anyone looked into this before? Any suggestions? I suspect I will have
> to implement something myself...
http://en.wikipedia.org/wiki/Mersenne_twister
Don't hesitate to post an implementation on the list or haxelib, since
it might interest other people as well.
Best,
Nicolas
More information about the Haxe
mailing list