We are about to switch to a new forum software. Until then we have removed the registration on this forum.
i have this code so far but i really just want to ball to move vertically and horizontally while it's changing colors at the same time, it'll be awesome if you guys can help, i'm also new here.
int y = 0;
int speed = 5;
void setup() {
size (200,200);
smooth();
}
void draw() {
background (255);
y = y + speed;
if (( y>width) || (y<0)) {
speed = speed * -1;
}
stroke (0);
fill(237,26,26);
ellipse (100, y+16, 32, 32);
}
Answers
Please edit your post (gear icon in the top right corner of your post), select your code and hit ctrl+o to format your code. Make sure there is an empty line above and below your code.
Are you familiar with this reference keyword: https://processing.org/reference/lerpColor_.html
Fixing your code a bit, demo below.
Kf
thanks dude
do you think you can make the ball bounce around the screen as well
Check https://processing.org/examples/
Specifically: https://processing.org/examples/bounce.html
Kf