another good solution
for random alphabet, use parseChar() function to get alphabet from ascii code. so you dont need String[] data
anymore, line saved!
ascii code for A is 65 and for Z is 90.
random between 65 and 90, will gives you random capital alphabet letters.
//show() function in Drop class change to this
void show() {
fill(0);
textSize(30);
char t = parseChar(floor(random(65, 90)));
text(t, x, y, y+len);
}
you dont need this anymore
String [] data = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K",
"L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
line saved!
and for random position, just random x location for each letter when hit bottom
void fall() {
y = y + yspeed;
float grav = map(0, 0, 20, 0, 0.2);
yspeed = yspeed + grav;
if (y > height) {
y = random(1, 5);
yspeed = map(0, 0, 20, 3, 5);
x = random(width); // add this
}
}