The first random value is always the same when using randomSeed

Hi Reva,

I might be wrong but, try initializing the randomSeed() only one time at setup:

void setup(){
  randomSeed(frameCount);
}

void draw() {
  println(frameCount + ": " + (int)random(10) + " " +  (int)random(10) + " " +  (int)random(10) );
}

and please have a look at https://processing.org/reference/randomSeed_.html
If you " Set the seed parameter to a constant it will return the same pseudo-random numbers each time the software is run.". If you don’t which this to happen just don’t set the randomSeed()

I hope it helps! :slight_smile:

1 Like