Login or create an account and code along whilst you watch this lesson.
In our last tutorial we successfully coded a single bouncing ball. Now what happens if we want to create a second bouncing ball? It seems like we can copy a lot of the existing code but there is a downside to this approach. Watch this lesson to see that it certainly can be done and also gain an insight into how we might better structure our code in these situations.
1 | Introduction to Variables | 11:32 | ||
2 | Animation the Hard Way | 12:12 | ||
3 | Animation Loop | 9:36 | ||
4 | Respawning with if Statements | 7:21 | ||
5 | Sunrise and Sunset | 22:25 | ||
6 | mouseX and mouseY Variables | 5:38 | ||
7 | if, elif, and else | 10:18 | ||
8 | Random Screensaver | 12:39 | ||
9 | Bouncing Ball Animation | 19:31 | ||
10 | Two Bouncing Balls | 9:43 |