I've been trying to recreate the same thing with objects. I finally got the sketch to start, except it is a blank, black screen. I've tried passing different arguments to bounce1 = Ball();, but the error messages have stopped being helpful. I'll probably figure it on in a day or few, but i'm getting tired of that kind of workflow :(
If anyone could tell me what's wrong it, I would really appreciate it.
Ball bounce1;
void setup()
{
size(200, 200);
fill(100, 204);
bounce1 = new Ball();
frameRate(30);
colorMode (RGB);
}
void draw()
{
background(0);
bounce1.display();
}
class Ball {
float y, x, radius, speedX, speedY, directionX, directionY;