I am trying to figure out how best to handle the animation of 2D installation growth in iOS.
I want the plant to come to life in order to cause an attack by the user. Basically, to revitalize the growth of the branch, with small buds that will eventually liven up in fully grown leaves. To breathe a little life into it, I would also like the plant to stagger a bit when it grows, instead of feeling hand-painted on the screen.
One of the ways I was thinking about is to use the CGPaths and Bezier curves to create the shape of the stem and leaves, but I'm not quite sure how to animate the drawing of the paths. As soon as I get a "drawing" of the stem, I would like to "plant" small buds at certain points on the stem, as the line grows / enlivens, and these buds also begin to grow outward from the plant.
Any suggestions on which route to take to complete this task? I would rather procedurally animate rather than draw each frame and animation in this way. My reasoning is that I assume that process animation will be less time-consuming, give me more control over various aspects of animation and will be reused in other projects (not to mention that it will be fun to program!)
I came across this blog post for drawing animated lines:
http://oleb.net/blog/2010/12/animating-drawing-of-cgpath-with-cashapelayer/
Perhaps this will be the initial approach to achieve the results that I I want, I need to sit down and go through the code that he posted.
Also, maybe it will be easier if you use cocos2d or something like that? Or perhaps the quartz and the main animation will work fine.
Thanks for any suggestions you may have. Any information would be helpful at the moment.
source
share