Hey folks, earlier I was asking about how to do lighting correctly but figured it out since. Now I've run into a new problem. I set out to a create a 12 row by 17 column mass of bricks in my game, with the intention of being able to delete bricks that the ball in my game hits. I tried several ways of using for loops to create said bricks, but couldn't figure out any other way besides what I did below here (the code I settled on using). The problem with this is that the variables are all local to the method this for loop sits within (createSceneGraph()). Even the Branchgroup object objRoot is local to that method and not the whole class. I tried making all these variables visible to the whole class but all I end up getting are NullPointerExceptions. Can anyone suggest an alternative loop structure that will allow me to access the objects drawn (in order to delete them) later on when I want to?
hmmm, just create a different class with methods to erase/add a brick.
hint: have the bricks just change to the background color, and if the ball touches that brick, check the color, if color.equals(bgcolor); then there is no boundary and let the balls x/y keep incrementing..