Fixup error 1 lead to a solution for the compiler error. Too much code in an if or loop (or both) wtih debug on (injecting more code when compiled) causes problems. For now debug is off, I'll clean it up a bit later.
With debug off the lag goes away from the collision routine. I guess something about all that debug code in the loop causes the code to multiply like crazy and therefore lag when you cleanup.
Back to where I was before, small (but still confusing) spikes on the draw routine. Going to narrow it down again and see if it's still the draw function or if it's a loop (like the collision-debug issue) but my suspicion is it's still the DrawImage()...
Thanks everyone for helping me with this. I really apreciate it and am in awe of how much you can figure out without me providing very usefull bits of information.
With debug off the lag goes away from the collision routine. I guess something about all that debug code in the loop causes the code to multiply like crazy and therefore lag when you cleanup.
Back to where I was before, small (but still confusing) spikes on the draw routine. Going to narrow it down again and see if it's still the draw function or if it's a loop (like the collision-debug issue) but my suspicion is it's still the DrawImage()...
Thanks everyone for helping me with this. I really apreciate it and am in awe of how much you can figure out without me providing very usefull bits of information.