I have released an update to my animation/tweening engine: LeanTween.
Updates include further optimised performance. It can be greater than 5x faster than the competing tweening engine iTween! I have a writeup comparing the speed of the two engines on my website.
Also included in this update is the ability to have a custom tween function, created by passing an AnimationCurve to the engine.
Hey thanks for the shout-out on the Signature Hippocoder.
Good point ZJP. Iâll have to update my write up comparing it to HOTween as well. When I started developing this, HOTween wasnât an option, so I am not that familiar with it, it looks like a better choice than iTween though (as far as speed goes).
It is also much faster than HOTween, but by a less drastic margin than iTween. In the same test HOTween had frame drops down to 15fps. I will update my article with screenshots of this soon.
Lars - I am not sure what playmaker actions are, but i will look into it.
GCat - You should be able to use this plugin just fine from a C# project. I will work on putting together an example project to illustrate itâs use in C#.
I am da bawss - Sorry for making your kitten sad :), you can also download it from Google Code at: http://code.google.com/p/leantween/downloads/list . The project may not open in Unity3.5, but you should be able to use the script just fineâŚ
Playmaker is a unity visual scripting tool.
You can ask Alex Chouls, the author and a unity forum member, he can give you all the details and probably a developer version of playmaker.
I was obviously curious and downloaded your test, then implemented HOTween. Ran it, and FPS seem to be exactly the same between LeanTween and HOTween (with LeanTween visually stuttering a little more, if my eyes didnât trick me), so maybe you set HOTween wrongly. Consider that:
HOTween uses an easeOutQuad easing by default, instead than the default linear one LeanTween uses
HOTween can be initialized too, to choose if you want to use an OverwriteManager or not. Using it obviously makes the framerate drop in case you have tons of tweens, like in your example. So I initialized it by disabling the OverwriteManager, since LeanTween doesnât have one, to have a fairer comparison.
Note that Iâm not saying this because I want to win the âtween competitionâ, but just because I read your statement, felt curious, and found it wasnât right Also, LeanTween seems to be a very different system than HOTween (more gameObject oriented), so it adds another degree of choice based on the tastes of the users, which is great. Congrats again
Hey Izitmee, thank you for the welcome. I didnât realize your engine used âeaseOutQuadâ as the default easing type, so I guess my initial test wasnât too fair. This did get me thinking I should expand my optimizations beyond linear tweens, because you were right once I adjusted to also use âeaseOutQuadâ the performance difference wasnât that different (although it still was waaaay better than iTween).
I now have a new version of LeanTween that is optimized for âeaseOutQuadâ, âeaseInQuadâ, âeaseInOutQuadâ (Iâll extend this to other tween types if requested) . Once I put these optimizations in LeanTween was performing about 2x as fast as HOTween and without the framerate spikes.
The new build is currently being approved by the Unity Store, but if anyone is eager to check it out you can download it from Google Code here. Also here are the files I used for testing the speed difference in case you see any mistakes (I enabled the overwritemananger but I didnât notice a difference).
The cpu profile of the different engines while tweening 1,500 boxes (This image doesnât quite capture how bad iTween worked compared to LeanTween and HOTween since itâs spikes went all the way up to 700ms, while HOTweenâs spikes only went up to 65ms, and LeanTween doesnât have any noticeable spikes.)
I just want to say HOTween seems like a very good tweening engine and I would certainly recommend it to others. The performance difference is probably not significant enough to make much of a difference, only when you may be tweening something ridiculous like 1,500 boxes. I think it really comes down to the style of programming that you prefer. HOTween looks to me more along the lines of Tweener, while I fashioned mine more like TweenLite.
However I would not recommend iTween to any new Unity developers. Most everyone has mobile on the mind these days and the performance hit is really too substantial to ignore. Developing for mobile you have enough challenges to get optimal performance, the last thing you need to worry about is your tweening engine causing hiccups in the framerate.
you need to disable it for speed test purposes as there is obviously some overhead in this management.
Best wishes for your project , Iâm personally a Hotween fan and have seen it grow in leaps and bounds via this community and Izitmeesâ excellent effort and collaboration on ideas/optimizations/features.