Page 1 of 1

MODULE DIE ROLL MECHANISM

PostPosted: February 29th, 2016, 10:34 pm
by STEVE747
I play almost exclusively Russian Front with the map extensions.

I am very curious to know how the die rolls are generated. Are the numbers on a conveyor belt or are they being generated and changed second by second? What I mean by a conveyor belt is: if the die roll button in the module is pressed now or 5 seconds later will the same number come up because it is sitting there in sequence waiting for the button to be pushed.

Can anyone comment on the die roll mechanism built into the modules and how the die numbers are generated?

Cheers!

Re: MODULE DIE ROLL MECHANISM

PostPosted: February 29th, 2016, 11:43 pm
by uckelman
Thus spake STEVE747 via messages:
> I play almost exclusively Russian Front with the map extensions.
>
>
> I am very curious to know how the die rolls are generated. Are the
> numbers on a conveyor belt or are they being generated and changed
> second by second? What I mean by a conveyor belt is: if the die roll
> button in the module is pressed now or 5 seconds later will the same
> number come up because it is sitting there in sequence waiting for the
> button to be pushed.

Neither. Rolls are not based on time, nor are they generated beforehand.
When you start VASSAL, a pseudorandom number generator is seeded from
a true random source (/dev/random on Linux, something similar on Mac OS
X, and some system service on Windows). Pseudorandom number generators
are deterministic, so with the same seed you will always generate the
same sequence of numbers---but that sequence is produced one roll at
a time. It is never waiting there in memory.

--
J.