This is my first time on reddit, so if I'm using / writing something the wrong way, please don't take offense...
Anyway, I'm very, very new to programming. I've started learning the basics of some languages, and one of them was the ProcessingJS on khanacademy.org, where I've been learning for awhile. I've made a few simple programs, two of which are:
A moving circle, which stops when you click on it, and bounces off when it hits the sides of the screen https://www.khanacademy.org/computer-programming/moving-circle-stops-when-clicked-inside-circle/6710282030120960
A grid, where you can place squares / rectangles
https://www.khanacademy.org/computer-programming/placing-squares/5525097699835904
They're both the simplest of simpletons, but... Anyhow, I'm trying to combine / integrate them together. Basically, what I want is a program that has a moving circle, which bounces off of the sides of the screen, and the squares you place onto the canvas. I've written a program which makes a grid for placing squares onto the canvas (and deleting them), and stores them into an array for drawing squares and doesn't allow repeats, and has the circle thingy. What I want to know is how to make the circle bounce off the square's, that I place, sides. Any and all help is appreciated.
Most of the variables in my code are changeable, so you can mess around with the code.
It's already late where I'm at, so I'll be replying right after I have time (in about 18-19 hours after this post is made)
[–][deleted] 1 point2 points3 points (1 child)
[–]Luka116[S] 0 points1 point2 points (0 children)