Closed MattFoley closed 11 years ago
If it's the falling block demo I tested this little tweak, from line 128 in DemoTransition.m
if (moved<4) {
int num = 2;
if (rand()%100 > 50) {
while (1) { // naïve loop to find a none moving square
i = rand()%4;
if (!(dyOut[i][j] > 0.0)) {
dyOut[i][j] = 0.02;
if (!--num)
break; // got one, leave now
}
}
}
break; // no more moving squares, leave outer loop
}
this is initiate falling of two blocks and not only one at a time, which makes it run faster.
Hope that helps.
Ah, wow, that's incredibly awesome! Thank you!
Is it possible to speed up DemoTransition one, or set a length of time? With a 100kb image, it usually takes a second or two to finish the transition on device, even on an iPhone 5. I'd like it to be closer to .5s.