Speed with paths x1, x4 etc

Hi

I’m wondering if anyone has done some transition animation based on paths and could give me some feedback on speed.  I have a very jerky animation and need to know if it’s because I don’t have  the advanced graphics pack yet (I know, I’m saving up) and as a result whenever I do a path based calculation I get a warning in the simulator.

This is fine and I don’t have an issue with it, _but_ my animation is running very very jerkily and I need to know if 

a) This is the simulator complaining each time I do a calc is the reason for  pausing the process

or

b) My code sucks and I’m trying to move too much stuff.

I’m technically animating ~ 160 displayobjects per transition.

I realise this may be the reason for the delay, but I don’t think so.  The actual transition is smooth.  What creates the jerk is when transition is initiated (hence invoking the paths) or the drawing of new objects when old ones have scrolled off the screen.

If anyone has used the transition function with the paths I would love to hear from you.

Michael

Hi Michael,

As you’ve seen by the warning in the console/Terminal, manipulation and access of paths is a Pro/Enterprise feature. If you’re trying to access this on ~160 objects, Corona is probably issuing that warning ~160 times, thus it will cause a performance hit. To confirm this, can you try doing a non-path (basic) transition on the objects? If you still see a performance hit, then it could be that you’re over-taxing the system with too many simultaneous transitions, or perhaps something else in your code is causing it.

Best regards,

Brent

Hi Brent

Thanks for your quick reply.

I’ve changed the code to just do a simple scale on all the objects and it absolutely flies, so I guess the number of transitions is not the issue and it is most likely the warnings.  I do want to upgrade, I just wanted to make sure that before I did my idea would work.

I suppose the only question still out there is does the paths manipulation tax the CPU more than say scaling?  Both distort the image but I’m assuming there is more maths involved in the paths manipulation?

Also does running a transition on multiple values affect its performance.

What I mean by that is changing the value of x1,y1 x2,y2 x3,x3 x4,y4 on each object vs just change xScale and yScale likely to put a bigger load on the system, or is it simply a case of having the engine redraw item X and it doesn’t matter what parameters change?

Thanks

Michael

Hi Michael,

I don’t think that performing transforms on path vertices would be much (if any) more taxing on the system than transforming scale values, but I don’t have any hard data to prove one way or the other.

Brent

Hi Michael,

As you’ve seen by the warning in the console/Terminal, manipulation and access of paths is a Pro/Enterprise feature. If you’re trying to access this on ~160 objects, Corona is probably issuing that warning ~160 times, thus it will cause a performance hit. To confirm this, can you try doing a non-path (basic) transition on the objects? If you still see a performance hit, then it could be that you’re over-taxing the system with too many simultaneous transitions, or perhaps something else in your code is causing it.

Best regards,

Brent

Hi Brent

Thanks for your quick reply.

I’ve changed the code to just do a simple scale on all the objects and it absolutely flies, so I guess the number of transitions is not the issue and it is most likely the warnings.  I do want to upgrade, I just wanted to make sure that before I did my idea would work.

I suppose the only question still out there is does the paths manipulation tax the CPU more than say scaling?  Both distort the image but I’m assuming there is more maths involved in the paths manipulation?

Also does running a transition on multiple values affect its performance.

What I mean by that is changing the value of x1,y1 x2,y2 x3,x3 x4,y4 on each object vs just change xScale and yScale likely to put a bigger load on the system, or is it simply a case of having the engine redraw item X and it doesn’t matter what parameters change?

Thanks

Michael

Hi Michael,

I don’t think that performing transforms on path vertices would be much (if any) more taxing on the system than transforming scale values, but I don’t have any hard data to prove one way or the other.

Brent