I'm working on a project with a partner for school. Currently we are remixing the BREAK OUT game but we're having some difficulty with the bricks.
We want the bricks to be randomly positioned on the canvas. We want these blocks to...
Generate within a certain area and leave an empty space in the middle.
Shapes do not overlap each other.
Don't go over the canvas.
What we're trying to figure out is how to generate these brick so that they don't overlap with each other. I've spoken with one of my teachers and we made most of this with her help, but there's still some fine tuning to be done.
As it is right now, the program is constantly redrawing the shapes. We also need to do the collision for the ball on the blocks and the paddle... we have the conceptual idea on how to do it, just not sure how to write it out.
Any help would be greatly appreciated (and of course credited!).