DrawImage Lag spikes...

BlitzMax Forums/BlitzMax Beginners Area/DrawImage Lag spikes...

hmmm, then it sounds like I've induced some bloat somewhere. each cycle (running 30fps) should take 5-8milli depending on my badguys and what they're doing. in stress tests I've run a few hundred guys with no problem so the 10 I have now shouldn't be the cause of any extra lag. What are common things that cause data to become unreferrenced? I have a sneaking suspicion that it's likely in my sound code (as I have a volume bug I haven't had a chance to look into yet) perhaps stoping sound channels is causing problems... I load all my images at the start of the game and the only other times I access them is when I either draw them or test for collisions. I'm not using any memory blocks or anything fancy like that, just user defined types and other variables. Maybe too many globals?

Thanks again for the help, I have no idea where I'd even start trying to troubleshoot this on my own. Too much code, not enough understanding on my part.