So, I'm writing this side scrolling rpg (think link to the past or secret of mana), and I'm at a point where I need collision detection.
I've got this idea to hand code the bounding boxes for solid objects into arrays, and use a for loop to check for collisions; something like this:
but I'm worried about the size of those arrays. Is it efficient to have a for loop run through every possible collision during every frame? I'm not quite sure, but I'd like to find out before writing that much potentially 'bad' code. Thanks for any insight you're willing to offer.
// a bajillion being a #define for the number of solid objects in a given map.
for (a=0; a<A_BAJILLION; a++)