Open project · after lesson 5: Objects and stars
Make a handful of balls that bounce around the canvas, each with its own colour and speed, and turn round whenever they hit a wall.

These light up when your code uses them. Click one to see where you learned it.
Tick each one when it is true of your project. Nobody marks it: be honest with yourself.
balls.push({
x: random(40, 360), y: random(40, 260),
dx: random(-3, 3), dy: random(2, 5),
colour: color(random(80, 255), random(80, 255), random(80, 255)),
});if (b.x < 15 || b.x > width - 15) {
b.dx = -b.dx;
}Tick every milestone first.
You built it with: