How would I detect if two 2D arrays of any shape collided?

Posted by user2104648 on Game Development See other posts from Game Development or by user2104648
Published on 2013-07-19T11:22:20Z Indexed on 2013/10/17 22:23 UTC
Read the original article Hit count: 187

Filed under:
|
|
|

Say there's two or more moveable objects of any shape in 2D plane, each object has its own 2D boolean array to act as a bounds box which can range from 10 to 100 pixels, the program then reads each pixel from a image that represents it, and appropriatly changes the array to true(pixel has a alpha more then 1) or false(pixel has a alpha less than one).

Each time one of these objects moves, what would be the best accurate way to test if they hit another object in Java using as few APIs/libraries as possible?

© Game Development or respective owner

Related posts about java

Related posts about 2d