AS3: Tweensy

It’s no secret that I am a huge fan of Jack Doyle’s TweenMax and a huge supporter of the GreenSock tweening platform. However, I would not be doing “my job” if I didn’t announce the release of Shane McCartney’s Tweensy. It is a new AS3 tweening engine that seems very advanced and robust. I took a quick look over some of the capabilities and I am impressed but I must say for beginners or people who aren’t crazy developers, Tweensy may seem a little bit too advanced.

While the basic syntax is very similar to TweenMax, Tweensy has a host of other features that you may or may not end up using that is split into a bunch of other classes. TweenMax is also being expanded into more classes like TweenGroup, OverwriteManager, the utilities classes, etc, but for some reason it still seems easier for me to use (this is probably because I’ve been using it for a while now). Shane boasts that the speed of Tweensy is faster than TweenMax in his speed tests. I indeed got faster speeds out of Tweensy in his test, clocking in at about 34 FPS on 5,000 objects while TweenMax gave me about 18 FPS. It is important to note, however, that using lower amounts of objects in Shane’s tests proved to show that the engines are VERY similar in speed and the difference is only seen at the higher object count.

I guess each speed test is, however, subjective. Jack’s speed test proves that TweenLite/Max are indeed faster than Tweensy, and by staggering amounts. In Jack’s test, Tweensy gives you a warning (like the Adobe tween class) that it may crash your computer, and if you proceed (with the default settings) you get about 2 FPS. TweensyZero, however, performs much better, but I still only got about 26 FPS as compared to 36 FPS out of TweenLite. I then compared TweensyZero to TweenLite with 5,000 objects in Jack’s test. TweenLite gave me about 16 FPS while TweensyZero gave me 1 FPS (I didn’t bother testing with Tweensy).

There are three other important things to factor into these tests. The first is that TweenMax is a bit slower than TweenLite because of the amount of extra features that it holds. That being said, however, it still reported faster than TweensyZero for me in Jack’s tests but Shane did not provide TweenLite testing in his speed tests, only TweenMax. The second is that Shane used a version of TweenMax in his testing that does not take into account the new features and plug-in architecture model that Jack is developing which also makes TweenLite/Max even faster. The last is that Jack’s tests come with the source files provided for your own testing and making sure there is no tampering. By no means do I imply that Shane’s tests have any tampering involved but it would be nice to view their source and see exactly how the two engines are being compared in his tests (more on this in the next paragraph).

I think the difference here is that Tweensy is using some stuff not normally done by other engines which I remember briefly reading about where it uses BitmapLayer to render the clips. Shane admits that while it is faster it does take a hit on your computer’s RAM which he is willing to trade off. Jack’s test uses Tweensy in much the way I think everyone else would use it, barebones-out-of-the-box with the similar syntax you’d use to write a TweenLite tween. If I am incorrect about any of this, by all means let me know as I have only looked at Tweensy very briefly.

I’m not jumping on the Tweensy bandwagon as I am still a huge fan of TweenMax (and the forthcoming update is going to be awesome, as well), but for anyone interested in Shane’s great work, definitely give it a run. I also want to point out that in NO WAY WHATSOEVER am I trying to demean the hard and great work Shane has done on Tweensy. It is up to you to decide what engine to use ultimately. I’m just pointing out some things that I noticed in comparing the two engines through their speed tests and feature sets. I mean, I didn’t even download Tweensy before I wrote this; it’s purely based on what I have read on the site and seen from the examples online (read: speed test).

If you found this post useful, please consider leaving a comment, subscribing to the feed, or making a small donation.

8 Comments

It’s not like we don’t have enough Tweening engines for AS3 out there, but this one is pretty damn cool. What’s cool about this one is that is supports a lot of cool effects transitions and such. Need to try it out, thanks for the info!

yes, the effects stuff is really neat, i agree.

The current tween test using even Jack Doyles tween test shows that TweenMax is slower even with his new plugin architecture beta version!!

I found this link http://www.lostinactionscript.com/examples/TweenCompare/tweening-speed-test-AS3.html on http://code.google.com/p/tweensy/ I to asked about the source code for that example supposedly its going public soon.

Brett,
Where in Jack’s speed test is Tweensy showing as faster than TweenMax for you? and if so, what settings are you using for the test? In all my tests TweenMax beats Tweensy…

and right before I posted this I realized you linked to jack’s speed test but edited by Shane. I don’t see the source but obviously there is something that is a part of Tweensy that needs to be “set” that the general public isn’t aware of right now that is making it seem faster in some cases, but through Jack’s speed test on HIS site it is slower.

On Jack’s speed test I get a warning when lauching it with tweensy, but on Shane’s speed test, his engine seems to be way faster than any other.
pretty wierd…

Tweensy has some advanced rendering in it that Shane has mentioned but I think that comes at the price of RAM. in his tests, though, he has enabled it while Jack hasn’t (as I think a normal developer opening up the two packages would not do as well).

As the author of Tweensy I have had Jack in touch with me and the version on his site is old and this is part of the confusion.

The latest version of Tweensy and TweenMax comparison is here http://www.tweensy.org/examples/tweening-speed-test-AS3.html. Though this test is purely testing just the property tweening aspect of the engines and doesnt consider substantial frame rate improvements via rendering DisplayObects onto a BitmapLayer. From my tests Tweensy is faster, but I’ll let you see how this works out for you.

One thing to also bear in mind if you don’t know the product split comparing TweensyZero for performance is not really a goal of mine as this product is there for small file size rather than being extremely effecient.

Yep, Shane is correct – the version on my blog is outdated as of 1/21/09. I contacted him immediately when I noticed the problems in Tweensy and he has been working out several kinks and garbage collection issues to improve the performance in Tweensy. There are still a few issues we’re looking into, and I’ll be sure to post an updated speed test when Shane has had a chance to address them. According to my tests, TweenLite and TweenMax are still faster with the new “fastTransform” plugin. But you’ll be able to see for yourself once the new speed test is up. The one Shane posted on his site doesn’t use the latest version of TweenLite/Max, nor does it show the fastTransform plugin, and it’s hard to know what’s going on under the hood since the source code isn’t posted (he has promised that’ll happen soon). But Tweensy certainly is one of the fastest engines out there with the improvements he has made, and has provided yet another solid option for the Flash community to explore.

Leave a comment

(required)

(required)