
-----------------------------------
goober69
Wed Jun 11, 2008 9:41 pm

Collision Detection
-----------------------------------
Heres my situation. I have a game where a small red dot (16x16) is controlled by the user, and he/she must navigate it through a maze. Problem is I need to implement collision detection so that the red ball cannot pass through walls. This is what I have:

public void COLLISION(){
            for(int i = 0; i < 225; i++){
                //UPWARD COLLISION//
                if(MY-2Coordinates[i][1] && Coordinates[i][2] == 1){
                    down = false;
                }
                //LEFT COLLISION//
                if(MX+18>Coordinates[i][0] && Coordinates[i][2] == 1){
                    left = false;
                }
                //RIGHT COLLISION//
                if(MX-2