To heck with random numbers...
When I init the random queue:
srand(TimeGetTime()); // this may not be the right syntax
I am going to get the same list of numbers if I do this command exactly when the system clock rolls over. When this is, I don''t have a clue, but it will happen some time.
The closest you could get would be to attach some physical device (a wheel, etc) to a serial port and poll it for random values. This may not qualify as random either, BTW, but it would be closer.
-goltrpoat
--
Float like a butterfly, bite like a crocodile.
However, there are truly random things. (Your agreement with this will depend, in the end, on philosophy more than mathematics.) Getting the computer to generate truly random numbers involves an outside stimulus.
If you want more info on this sort of thing, check out:
http://www.random.org/
and for a cool way of getting random numbers:
http://lavarand.sgi.com/
---- --- -- -
Blue programmer needs food badly. Blue programmer is about to die!
TRUE Digital randomness dosent exist but for our purposes its probably good enough. And probably better that it isn't really random as it makes for much easier syncronization for multi-player games
Edited by - UraniumRod on 5/1/00 6:01:08 PM
Some guys at SGI recently found a cheaper solution, though. They pointed a camera at a lava lamp and used calculations on the resulting images to generate their numbers.
(my byline from the Gamedev Collection series, which I co-edited) John Hattan has been working steadily in the casual game-space since the TRS-80 days and professionally since 1990. After seeing his small-format games turned down for what turned out to be Tandy's last PC release, he took them independent, eventually releasing them as several discount game-packs through a couple of publishers. The packs are actually still available on store-shelves, although you'll need a keen eye to find them nowadays. He continues to work in the casual game-space as an independent developer, largely working on games in Flash for his website, The Code Zone (www.thecodezone.com). His current scheme is to distribute his games virally on various web-portals and widget platforms. In addition, John writes weekly product reviews and blogs (over ten years old) for www.gamedev.net from his home office where he lives with his wife and daughter in their home in the woods near Lake Grapevine in Texas.
Someone would have to issue a:
SysReboot(&this->Universe()); // not recommended
In order to get a different srand() seed.