How to make PImage fall at random positions at random times

Hi, i'm trying to make a game where we need to catch eggs when they fall down, but i have trouble figuring out how to make them come out at different times at different positions. this is what i have so far in terms with the eggs, please send help.

PImage egg;
float y;

void setup() {
  size(500, 500);
  egg = loadImage("RegularEgg.png");
}

void draw() {
  background(0);
  image(egg,0,y,50,50);
  y+=1;
}

// image of egg
RegularEgg

Answers

This discussion has been closed.