I've started a side-scroller that keeps the player in the center of the screen, and so far I've been able to get the vertical collision detection going just as I want it, but the horizontal collision detection is puzzling me. I have all of the tiles moving with a single variable, but when I have a collision, I have to call a For-Each-Next loop of the tiles whose loop we're in, and this, I think, is what's making the tiles created after the one we collided with move, but not the ones created before it.
Is it the loop-within-a-loop-of-the-same-type that causes this? And if so, how can I fix it?
|