GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

why is random not random?

AKBAKB Posts: 7Member
edited November -1 in Tech Support
I have seen many posts regarding this issue, but it seems to have not been solved yet.
How can I make dropping items from the top of the screen random?
Thanks

Comments

  • AKBAKB Posts: 7Member
    drop at random times and replicate with a random number
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    Hi AKB
    AKB said:
    Why is random not random?

    OK, for interest, a couple of progs I've dabbled with is RealBasic and LiveCode (Formally Runtime Revolution) and in both their Forums, the question of Random on a computer came up. And, as you say, random has been mentioned in our Forum as not being true random. It seems that it's quite a complex subject, this random lark, and from what I gathered from the posts on the those other two Forums is that most, if not all, random number generation by computer programs is not truly random. There was much scientific evidence bounding about to support this, but the conclusion was that random, generated by these computer programs, is more than good enough.

    There was talk of random not working at all within GS at one time, but I don't remember having any trouble; perhaps someone else will chime in there...

    So anyway, say if you want an actor to "drop at random times and replicate with a random number", I'm assuming you mean you just need random spawning? (The moment they are spawned, they'd drop immediately?) If so, look at using a Timer Behaviour to randomly generate a Spawn Actor Behaviour, something like:

    When touched is pressed

    Every random(3,10) ---or whatever your min and max seconds are ---

    Spawn Actor.

    Anyhow, after all that, hope I understood your question correctly and it helps!

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • AKBAKB Posts: 7Member
    Thanks gyroscope,,
    That was helpful, yet I am using every random(min,max) but don't seem to
    get a random output. The outputs are very close to each other (i.e. time intervals are
    almost identical)
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    Ah, perhaps that's the prob the other guys on this forum was talking about...

    I'll do a little test for interest and see if I can see what's what... !

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    Hmm, see what you mean...it surely should work like that, logically speaking. A vague memory now of a workaround, but don't know where the post is in the Forum unfortunately. Must have been what the other members were so annoyed about it not working at all...Frustrating prob I know so hopefully someone else will point you in the right direction.

    Let's hope that it's all sorted in 0.9.0 which is imminent, so we're told. Sorry can't help anymore than that.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • AKBAKB Posts: 7Member
    Thanks anyways gyroscope !
  • FranzKellerFranzKeller Posts: 517Member
    i had thought that you could randomize the random by continually grabbing random values before the user hits a game start button

    this timing being different each time, it might jumpstart the code?
This discussion has been closed.