As in, technically. Not having a clue, I've always assumed that it used the system clock... using the fractions of seconds. The exact moment a 'chance factor' is to be calculated, the program glances at the system clock: it's afternoon... 14:08:43.25 to be exact,
.25 is your number, and so if you needed something that only had a 20% of happening, well then drat -- you just missed (you're just over it). It seems like this would've been the easiest thing to do, if you're a programmer. Alternatively, maybe the game has it's own internal timer running, instead (but same principle). Anyhow, I've always wondered.
Of course, it's called a "random number generator", but my question still applies... how exactly does it actually come up w/ the 'random' number? I can't think of a better way than what I described... random timing of the user input (or moment the program needs a calculation done), tied to the endless cycling of the system clock.
Or maybe it uses algorithms that are more complicated than I can possibly imagine.
.25 is your number, and so if you needed something that only had a 20% of happening, well then drat -- you just missed (you're just over it). It seems like this would've been the easiest thing to do, if you're a programmer. Alternatively, maybe the game has it's own internal timer running, instead (but same principle). Anyhow, I've always wondered.
Of course, it's called a "random number generator", but my question still applies... how exactly does it actually come up w/ the 'random' number? I can't think of a better way than what I described... random timing of the user input (or moment the program needs a calculation done), tied to the endless cycling of the system clock.
Or maybe it uses algorithms that are more complicated than I can possibly imagine.