View unanswered posts | View active topics


Reply to topic  [ 3 posts ] 
GTween + Tweener = GTweener 
Author Message
Member

Joined: Wed Aug 01, 2007 3:37 pm
Posts: 1130
Location: Roseville, CA
Post GTween + Tweener = GTweener
The perfect tweening library?

As you know, creating tweens is foundational to practically any project you build using Actionscript. I've always loved using Tweener for its "set it and forget it" simplicity. Whether or not I have "old" tweens running, my objects animate the way I expect them to, and I never experience the strange results of having multiple tweens animating the same property at once.

However, other tween libraries boast greater performance than Tweener. The sacrifice you make in managing these libraries rewards you with a faster frame rate -- critical for any project that is graphic intensive.

Some time ago I saw GTween and thought its features and performance were both enough to make me consider changing from Tweener, but in the end I was happier with how simple Tweener is to manage.

Finally, I tried my hand at combining my love for Tweener's simplicity with GTween, to see if I could create a GTween manager that would still be easy to use but benefit from GTween's features and better frame rates.

Benchmark

I pitted the new library against GTween and Tweener and I was surprised by the results:

GTween: 12,015ms
Tweener: 30,532ms
GTweener: 12,657ms

10,000 objects, simultaneous x, y and alpha tween, no easing

GTween: 12,406ms
Tweener: 31,313ms
GTweener: 12,657ms

10,000 objects, simultaneous x, y and alpha tween, ease out exponential

*These numbers are provided to illustrate relative performance, not absolute performance against other libraries

It runs practically as fast as GTween but gives you global functions like Tweener (addTween, removeAllTweens, pauseTweens, etc.) and removes the hassle of remembering whether an object already has an active tween running. Simple like Tweener, but functions like GTween.

Download

I packaged GTweener together with GTween Beta 4 and the Equations class from Tweener (for easing), so you can download either an example FlashDevelop project using GTweener or just the source files:

http://code.google.com/p/gtweener

Feedback

Please leave your comments to let me know what you think and how I can improve it!


Last edited by elyon on Wed Feb 25, 2009 11:19 am, edited 3 times in total.



Wed Jan 21, 2009 10:10 am
Profile WWW
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 1745
Location: Helsinki, Finland
Post Re: GTween + Tweener = GTweener
Also check TweenLite family out: http://blog.greensock.com/


Wed Jan 21, 2009 10:29 am
Profile E-mail WWW
Member

Joined: Wed Aug 01, 2007 3:37 pm
Posts: 1130
Location: Roseville, CA
Post Re: GTween + Tweener = GTweener
Good reference. I hadn't looked into TweenLite/TweenMax in a while, and it is interesting how many features have been added since the last time I gave it a try. Still, there's something about GTween that I just like.


Wed Jan 21, 2009 10:59 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.