Welcome! Today we will learn how to make art and animations using code, and how to stay positive when our code does not work right away.
Creative coding is like painting with math and logic. We write instructions to draw shapes, mix colors, and move objects on our screen.
Sometimes our code has bugs, and our shapes do not appear where we want. When this happens, we use goal setting and courage to try new ideas instead of giving up.
By breaking our big design goals into small steps, we build confidence. We can animate a circle by changing its position over and over.
✏️ Worked example
Imagine you want to code a moving car, but the wheels are floating in the air. Let us use goal setting and courage to fix this challenge independently.
- First, stay calm and do not give up. We have the confidence to solve this.
- Set a clear goal: Move the wheels down so they touch the bottom of the car body.
- Check the coordinates of the car body. The bottom of the body sits at a height (Y) of 150 pixels.
- Look at the wheels. Their height (Y) is set to 100 pixels, which is too high up.
- Change the wheels' Y coordinates to 150 pixels to match the car bottom.
- Run the code again! The wheels are now in the right spot, and our goal is met.
Want the full interactive lesson — quiz, animations, and Finn cheering them on?