delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/27/10:34:32

Date: Mon, 27 Sep 1999 09:59:27 -0400
Message-Id: <199909271359.JAA31923@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <37EF5092.AC25A67F@pmail.net> (message from Fred Backman on Mon,
27 Sep 1999 13:10:10 +0200)
Subject: Re: srand()
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990927095045 DOT 8548G-100000 AT is> <37EF5092 DOT AC25A67F AT pmail DOT net>
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Note that the "best" ways of getting random numbers involve an
external electrical circuit that is purposely noisy, and sampling it.

One hack I used "way back when" was to cycle the random number
generator while polling the keyboard during the "press any key to
begin" screen.  Human reaction times are random enough to seed the
generator.

> This is a bit off-topic but when we made games for the Commodore 64,
> we used to play around with different random number generators a
> lot, and one lazy hack was to use the white noise waveform generated
> by the SID sound chip, which basically was an undocumented random
> number generator. Pretty mad, but it actually worked

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019