Quote from: Calin Leafshade on Thu 26/08/2010 13:39:06EDIT: actually a better way of suffling the array would be to iterate through it instead of brute force randoming.
Indeed, that was what I was trying to suggest. Also, though I'm not sure if it came across, part of my reason for proposing it was that it wouldn't require you to initialize the array, you could simply proceed the number of pixels you want to dissolve each frame and then pick up from there following game loop.
QuoteCode: ags while (i < 200){ pixel temp; temp = pixels[i]; int ran = Random(200); pixels[i] = pixels[ran]; pixels[ran] = temp; i ++; }
Maybe I'm misreading your code, but should the random seed decrease every iteration? Like so:
int ran = i + Random(200-i);