How can I make objects move in different directions?
Prompt
If youโve ever let a device sit idle while itโs plugged into something like a laptop, DVD/Blu-ray player, game console, or even watched a Smartboard, youโve noticed that the people behind those hardware systems have made a โdefault screenโ to display when nothing is happening. Sometimes, this is just a static logo - but in the best versions, it is a logo that moves around the screen. This can be pretty enjoyable to watch, and pretty distracting, as you can see from this example.
Using what you know about animation, you are going to create a simple DVD screensaver (or any device really) with a logo to send bouncing around the screen.
DVD logo traveling around screen and bouncing on edges with color change on bounce
Your project should have and do the following:
Have a basic logo made of several p5 shapes, or multiple images, or multiple lines of text, or a mix of all three. It should not be just a single shape/image/text line!
When you hit play, the shape should begin moving around the screen.
If the shape gets to an edge, it should bounce back and travel in a different direction. (It can absolutely change speed when it picks this new direction!)
Writing Prompt:
Pick one conditional statement used in your program. Using comments, explain what it does and how/why it works.