Quote:Original post by Anonymous PosterQuote:Original post by Grant1219
Thanks for the help. I did think of using an iterator for the loop, but never changed for some reason. I'll try to take out all the unecessary stuff. Also Morpheus011, you said "You're also doing a fair amount of if checks in the for loop which could lead to a high amount of branch mis-prediction", but don't those if checks have to be in the loop?
Tickstillupdate really looks like it shoudl be done Outside the particle iterator loop. Or is there a reason that ticks are updated once per particle as opposed to once per game cycle?
ticksTilUpdate is for delaying the update of the particle system, in case if I didn't the particle system to update every game loop cycle. It has nothing to do with my main timer.
I changed the map to a vector, and made a destination BITMAP so it's not calling that GetBuffer() function constantly. I was really surprised, it really speed up the particle system considerably.