Ask a Question related to Macromedia Director Basics, Design and Development.
-
Somnifer #1
'random' not really random ?
I'm developing a cardgame that randomly draws 5 cards at the push of a
button. The game is up and running (mostly), but during testing, I noticed
that when the same conditions are met, the game tends to 'randomly' draw the
same cards. (I'm not using the randomseed, just 'rnd'...)
I remember reading somewhere a while ago that the random-command isn't
really random, but is dependent on the processor. I don't know the technical
details, but do correct me if I'm wrong...
Has anyone else encountered this ? And is there a way to fix this ? Or did I
maybe make a mistake in my scripting ?
Somnifer Guest
-
how can i Random?
i made a game , i need when i press the button the var "commemt" to be == 1 of these "nice shoot, good aiming, keep it up" what is the code to... -
Using Math.random to go to random frames
Hello everyone. My cerebral density is preventing me from seeing the solution to this problem. I have the following code which causes the user to... -
Random.h
Hello! I'm trying to #include <linux/random.h> because I've read somewhere that if I need very good random numbers in linux thats the way to... -
PS7 random dpi changes 200 -> 300 HELP
Are you SURE that all images were shot at same rez/format in camera? Reason I ask, is that some cams put different EXIF ppi tags into different... -
Random image in a random place.
Anyone know javascript? I have a grid(4 x 4) of 16 spacer images and a few text links on the side. Each text link represents a different folder of... -
JB #2
Re: 'random' not really random ?
The randomness is not as prefect as nature, you would not want lingo's
random to control the payoffs of an online ganbling site.
The randomSeed might ba automatically scrambled, but you can set it to a
different value each time a random series is started with
the randomSeed = the milliseconds
Better to have user click initiate it, rather than say prepareMovie when
the milliseconds tends to be the same value each time.
JB Guest
-
Somnifer #3
Re: 'random' not really random ?
How such a single line of code can make such a huge difference... The drawn
results are much better now.
Thank you for the tip !
"JB" <lingoguy@sbcglobal.net> schreef in bericht
news:lingoguy-DEF4D1.15035830042004@forums.macromedia.com...> The randomness is not as prefect as nature, you would not want lingo's
> random to control the payoffs of an online ganbling site.
>
> The randomSeed might ba automatically scrambled, but you can set it to a
> different value each time a random series is started with
>
> the randomSeed = the milliseconds
>
> Better to have user click initiate it, rather than say prepareMovie when
> the milliseconds tends to be the same value each time.
Somnifer Guest
-
BJChadwick #4
Re: 'random' not really random ?
In article <c6ufeh$s9v$1@forums.macromedia.com>, "Somnifer" <somnifer@pandora.be> wrote:
I don't know if Director does this deliberately (sp?) but Visual Basic gives>I'm developing a cardgame that randomly draws 5 cards at the push of a
>button. The game is up and running (mostly), but during testing, I noticed
>that when the same conditions are met, the game tends to 'randomly' draw the
>same cards. (I'm not using the randomseed, just 'rnd'...)
>
>I remember reading somewhere a while ago that the random-command isn't
>really random, but is dependent on the processor. I don't know the technical
>details, but do correct me if I'm wrong...
>
>Has anyone else encountered this ? And is there a way to fix this ? Or did I
>maybe make a mistake in my scripting ?
>
>
>
>
you the same sequence of random numbers from the generator unless you use the
command "randomize timer" (which is equivalent in VB to the fix you were given
for Director.) InVB it is deliberate to aid in the debugging process -- giving
a predictable sequence for debugging. Once the program is up and ready to run
you slip in the command that makes it as random as possible. It wouldn't
surprise me to find that Director did it for the same reason.
BJ
BJChadwick Guest



Reply With Quote

