Does anyone know of a project with a lot of similar objects (e.g. ants moving around or bouncing balls or else) that runs faster in its 1S1S version than in its multiple-sprites version?
Offline
You could probably create your own projects that do both? But I believe using multiple sprites in general is faster, you just have to maintain multiple of the same object (which will probably change thanks to cloning in 2.0).
Last edited by Magnie (2013-01-28 18:14:39)
Offline
I suppose you could avoid forever-loop-sync problems like this by designing a project as 1s1s. But then again you could do exactly the same implementing a updating cycle like this:
when gf clicked forever set [timer_init v] to (timer) broadcast [update v] and wait broadcast [render v] and wait repeat until <((timer_init) - (timer)) > ([1] / [60])> //60 FPS wait [0] secs end end(I haven't tried it myself; read it from someone in these forums)
Offline
Magnie wrote:
I believe using multiple sprites in general is faster
Yes. For every other programming language using sprites would be slower (it requires a considerable overhead) but, as Scratch lists are much slower than handling sprites (and you need lists to store all the necessary information), in the end multiple sprites are faster than 1S1S.
Offline
s_federici wrote:
Scratch lists are much slower than handling sprites (and you need lists to store all the necessary information), in the end multiple sprites are faster than 1S1S.
Unfortunately, this isn't good for me when I have to show why the majority of programming languages are heavily 1S1S (1 thread) and not based on multiple threads instead...
Offline