----------------------------------- Josh_VK Sat May 22, 2004 6:39 pm Could you take a look at this ----------------------------------- Ive got most the coding for a pong game where you hit the bricks aka. androids or whatever.. but im haveing trouble making the ball reflect and clear the ball.. i think im just not seeing something. if someone could just look this over and find my mistake id apreciate it.. if you run it youll see what i mean.. ----------------------------------- Tony Sat May 22, 2004 8:32 pm ----------------------------------- umm... yeah... your box is hardcoded it seems. You draw it every time and you never check if it is still there or not. you suppost to have an array of boxes and if one gets destroyed, you mark that array element as so ----------------------------------- Josh_VK Sat May 22, 2004 11:08 pm ----------------------------------- Ok im not sure if i get what you mean?... so i set an array for draw box or? anyone else can help? ----------------------------------- SuperGenius Sun May 23, 2004 9:02 pm ----------------------------------- i think what tony intends for you to do is set up a 2d array that holds the status of the bricks, and when one is hit you change that specific value of the array to reflect that, and update the bricks. ----------------------------------- Josh_VK Mon May 24, 2004 1:40 am ----------------------------------- My Brain Hurts ----------------------------------- Cervantes Mon May 24, 2004 7:45 am ----------------------------------- go into turing, type "array", and press F9. read what it says, then make a simple program using an array. then come back here and see if you can understand what tony / supergenius recommend. ----------------------------------- SuperGenius Mon May 24, 2004 1:34 pm ----------------------------------- once again, i'll use code from my connect 4 to illustrate. there is a 2d array called board. when this proc is called it examines each value of the array to check if there is supposed to be a checker in the corresponding grid square, and then if there is supposed to be one it checks to see what colour it is supposed to be. proc drawboard for h : 1 .. 8 for c : 1 .. 8 if board (h, c) not= " " then if board (h, c) = "RED" then Pic.Draw (redchecker, 107 + c * 60, 55 + h * 60, picMerge) elsif board (h, c) = "BLUE" then Pic.Draw (bluechecker, 107 + c * 60, 55 + h * 60, picMerge) end if end if end for end for end drawboard so imagine the area of your game as a hypothetical grid, and you can impliment something like what i've shown you, except for bricks instead of checkers.