PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Random number generation ?

Does anyone have any good random number links/source they would share? I'm generating planets ( class, technology, religion etc etc plus numerous trade goods but the random numbers I'm getting from the standard srand / rand functions don't seem to vary enough so I can get planets and sometimes whole solar systems which are identical
Mersenne twister - http://www.math.keio.ac.jp/~matumoto/emt.html

Definately my favorite.
Conan · 04 Jun 2003, 20:32 UTC — Many thanks
Thanks a lot. I have downloaded source & will try tomorrow.
Conan, what are you seeding Srand with? I have never had a problem with things ending up the same when I seeded it with system time.
Conan · 05 Jun 2003, 06:39 UTC — srand seeding
Normally I'm using the system time but I tried some variations when I started seeing results which looked the same. Most of the development & testing is on PC not PocketPC so I don't know what the results would be on CE. I cannot actually remember what my alternative to system time was & the laptop is zipped up in my case as it's time to go to work :(
I'll second the Mersenne Twister.

If you want speed, I have a quick-and-dirty ARM routine somewhere, but it's not a "good" PRNG.

(This is getting surreal, this is the third mention of PRNGs I've come across in two days).