The title might be a bit misleading but I don't know what to call it exactly.
I have several objects that need to do certain collision checks ( like bullets hitting enemies but not the player).
I was thinking of making a "matrix" where objects are checkt against bullets. And each cell returns a true or false. Like so:
B1 B2 B3 ObjectX   ObjectY   ObjectZ  
Then in my collision loop I'd would do something like:
But in this situation the id order is critical. So far I've put all my objects in buckets depending on their position/section( 2D game). But this doesn't mean all of them are compatible to collide with each other nor is there a separation of objects depending on their types.
I was wondering if anyone could give me input or other methods I could go with to check whether objects should collide. Setting the matrix up could also be a lot of work. I wonder if some one knows a neat trick to automate it at runtime.