Performance question regarding transition.to

Hey all, just a quick one:

Can anyone comment on which of the following scenarios would perform faster and be more efficient (I had thought transition.to was handled by the Corona engine so scenario 2 is better?)

Scenario
Say I have 50 objects and I want to rotate all of them over a period of 1 second.

Option A
On the enterFrame, loop through the table of 50 objects and manually perform rotations on them by hand using LUA.

Option B
Create 50 new transition.to statements (one for each object) to let the transition manager handle the heavy lifting.

Anyone have any experience they could share with this type of situation? How scaleable is the transition system anyway (does it degrade if you use many of them)

Thanks!

From what I've read here in the forum you'd be quicker to do it with transitions.
transition.to uses the underlying code engine, which will always be faster than the lua layer on top of it.
However, the lack of control during the transition might push you towards doing it yourself in certain circumstances.

Thats what I'm thinking but I'd also like to know whether spawning a new transition has any garbage collection ramifications (which you wouldn't get simply looping through objects).

I used transitions heavily in my last game but it really struggled on Android (worked flawlessly on iOS) - but I haven't been able to pinpoint whether it was the transitions or something else...

using transitions seems to be the best way of doing this.
I'm writing a particle engine which can handle 50+ particles at once that are subject to several transition.to's
I.e. fade in, fade out, movement, rotation, scale
all at once.
And by 'can handle' I mean it runs fine in the simulator :P
I dont have an android phone, and I'm on windows, so I have no way of testing on device.
if you want my source to try on device, im more than happy to post it

Transitions do not support the app paused / resumed events as far as I know, so I'd use it for simple and game-independent things only.

views:1563 update:2011/10/5 21:23:48
corona forums © 2003-2011