@x-pressive.com said:
So every sprite instance requires its own sequence data now?
Not necessarily. If I understand your question, do you mean that every sprite instance must have its own self-linked sequence data? Not really… the sequence data can be stored in a separate table and then the named sequences can be used and re-used for any sprite via an upvalue lookup. So in theory, you could have 4 different sprites using 4 different image sheets, but use just ONE sequence for all of them, assuming that sequence “pattern” (start frame, count, time, etc.) was the same for all 4 sprites. I think keeping the sequence data outside of the image sheet is, in this new API, more flexible… and upvalue lookups shouldn’t cause a noticeable performance hit unless you’re doing 10000 of them in a loop or something similar.
I do, however, hope Ansca adds “timeScale” to the new API. If I have 3 core player animations, and I also want the same 3 sequences in a *faster* time loop, I now have to add 3 new sequences and switch from “normal” to “faster” every time. In the old API, “sprite.timeScale” allowed me to just speed up or slow down the same sequence, on the fly, with one command. Much easier. 
And would it be more efficient to use newImageRect then instead of sprites if we do not need animation and just want to be able to swap the currently displayed frame of an image?
I mentioned this in my comment above. Most likely the upcoming "sprite:setFrame(frame)"
will work perfectly well with *static* images too, not just sprites. I think that was one of the key points in this entire API… previously if we wanted an object with 2 “frames” that we wanted to change occasionally (i.e. a light bulb “on” and “off” images), we had to make it into a sprite and swap the frames. This added unnecessary overhead to an object which really wasn’t an animation.
Brent
[import]uid: 9747 topic_id: 23275 reply_id: 93552[/import]