The mysterious "sliding half-castle"

BlitzPlus Forums/BlitzPlus Programming/The mysterious "sliding half-castle"

Tomas Khan(Posted 2009) [#1]
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?


Tomas Khan(Posted 2009) [#2]
I've discovered the power of posting. This morning, I realized the problems -- one, I wasn't changing one of the variables; two, I was drawing the earlier ones before their coordinates were changed. It works fine now. Thank you!