[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random Number Generation



<KCR103@psuvm.psu.edu> writes:

>I am working on Dawn of Time for the GS and want to know the best (fastest) way
>to generate random numbers.  I was actually thinking of generating a table of
>32000 random numbers for the program to use over and over.  Only the starting
>point would need to be randomized then and a counter incremented for each numbe
>r (random) required by the program.  Is there significant enough overhead in
>generating random numbers that such a random number table would be warranted or
>worthwhile.

Although its not applicable in this situation, I've found a simple way to
generate random numbers on an older // (I don't know if it works on a GS).

Simply turn on a 5.25 drive, read one byte, and turn it off.  There's no way
to predict what you'll get.  Even with a disk in the drive.

- Jonathan

-- 
         ** Atlanta Braves - Back to Back NL Champs '91 and '92 **

 Internet: jdeitch@gisatl.fidonet.org   Fidonet: Jonathan Deitch@1:133/411.7
           musjndx@gsusgi2.gsu.edu      Bellnet: 1 - (404) - 261 - 3665           
-----------------------------------------------------------------------------
Atlanta 1996 !! | Play Pinball !! | Don't Panic ! | "I hate it when I can't
--------------------------------------------------| trust my own technology!"
"Thrills!  Chills!  Magic!  Prizes!" -- Hurricane |    -- Geordi LaForge

Gene Roddenberry, Isaac Asimov, Jim Henson, Dr. Seuss, Mel Blanc ... Sigh ...