I was trying to create a game with Kat’s code of falling glitter (something like Catch the Falling Glitter with the Bucket) but I didn’t know how to make the glitter disappear into the bucket.
For now, here’s a very simple screensaver inspired by Kat’s random color variable. I had a lot of fun playing with this.
The code:
//DECLARING VARIABLE float cloudX; float cloudY; //float sizeX; //INITIALIZE VARIABLE void setup(){ size(800,800); background(255); //cloudX = width/2; //cloudY = height/2; } //USE VARIABLE void draw(){ cloudX = random(width); cloudY = random(height); //sizeX = random(width); //background(255); stroke(135,206,235,20); fill(135,206,235,70); ellipse(cloudX,cloudY,200,100); if (mousePressed) { float r = random(0,255); float g = random(0,255); float b = random(0,255); float a = random(0,255); fill(r,g,b,a); ellipse(mouseX,mouseY,30,30); } }