Create account / Log in

MODULE DIE ROLL MECHANISM

Topics related to the main Vassal engine.

Moderators: Tim M, uckelman

MODULE DIE ROLL MECHANISM

Postby STEVE747 » February 29th, 2016, 10:34 pm

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!
STEVE747
 
Posts: 10
Joined: November 10th, 2012, 6:47 pm

Re: MODULE DIE ROLL MECHANISM

Postby uckelman » February 29th, 2016, 11:43 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8120
Joined: December 10th, 2007, 9:48 am
Location: Durham, England


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests