Original Post
Hey guys ive posted this question in a lot of other forums but i have not really gotten a solution yet a friend of mine recommended this forum to me so i thought id give it a try. Anyway at the moment im creating a Puyo Puyo game in Java puyo puyo is basically tetris the only difference being instead of blocks its spheres that are connected to each other side by side. My problem is collision detection im trying to implement grid collision detection. After a set of puyos has fallen if another set tries to fall into that same location on the board it should stop on top of it and not overlap in other words collision. Basically what i did is i listed all the possible locations the puyos could fall at the bottom of my board which is 12 X 6. If a location is not null then there is something there what im not understanding is that once a puyo has fallen and that location is no longer null how do i perform a check if another puyo is trying to fall in that same location and keep it from overlapping the other puyo. If anyone can help id really appreciate it.
//Check to see if the position located at p1 and p2 is holding a set of puyo's.
public boolean positionEmpty()
{
p1 = puyolist[0][11];
p2 = puyolist[1][11];
p3 = puyolist[2][11];
p4 = puyolist[3][11];
p5 = puyolist[4][11];
p6 = puyolist[5][11];
if((p1 != null) && (p2 != null)){
if((p3 != null) && (p4 != null)){
if((p5 != null) && (p6 != null)){
}
}
}
return false;
} [Edited by - Greenbird on November 6, 2009 2:13:27 PM]