Snap! is kinda slow, but it needs to be compiled and more faster, I used snapinator on scratch project, and its reaaallly slow, Any way to make it faster?
Yeah, lots of. Could you share a link to your project, please?
XML: scratch project boxing over it xml file (converted with snapinator)
why didn't you just save it to the snap cloud and share the project?
I looked at the code and saw a ton of forever loops. Snap lags when there's a ton of forever loops. Try to make it not use as many forever loops, it'll work.
Oh ok , thanks
Make sure you use broadcasts to emulate async forever loops(no takes-very-long-time-sync-or-wait)
But what if all of those loops are necessary?
if I took the time, I could probably take all the loops out and use broadcasting instead.
wouldnt spamming broadcasts have the same effect on lag
it would have less lag than many scripts repeating forever at the same time
just use the warp block
} :: grey
naw warp block stops all threads and starts them after run.
so warp === lag
Warp stops all the other threads so that this thread gets all the processor time.
So the other sprites can't execute animations loop. The whole stage area appears to be freezed or chopppy at best.
Yes. "Appears" is the key word. When you use warp, it's because you want to do just computation, not display updating, until the thing you're warping finishes.
One thing that's useful even in a graphics project is to warp some medium-level piece of the program, so for example if you want to draw a whole forest of fractal trees you might warp the drawing of each tree, rather than warp the entire picture.
But sometimes graphics isn't what you're after at all. You want to compute the next move in your chess program or something, and there's nothing to draw until you've finished that computation.