The next update for TweenGMS should be out in a couple of weeks. I have done a large overhaul to the inner workings of the system, making it much more optimized and polished overall.
But, before releasing it, I want to mention some new functions and to get feedback on some potential changes.
The new update will include a new group of simple functions:
These functions can be used by themselves, and do not require the use of a reference from TweenCreate(). However, they can not be manipulated once they have been started. With the exception that they will still be affected by TweenPauseAll(), TweenResumeAll(), etc. As well, they will belong to group 0, so that they could be manipulated with the group functions as well.
I've added a function to allow for the ability to prevent deactivated instances from having their tweens automatically destroyed:
In such a case, however, it is up to the developer to re-enable auto destruction later, or to call TweenDestroy() manually. Failing to do so would likely result in a memory leak.
I have since found a better way to automatically handle deactivated/reactivated instances which use tweens. Users shouldn't need to worry about this anymore with the next update.
I am considering changing how specific ease functions are accessed. Right now, constants are used, such as EASE_IN_OUT_CUBIC. However, I am playing with the idea to have them work like the variable/property setters, e.g. x__, image_alpha__.
This would leave the scripts exposed, and not part of the actual GEX. They would need to be imported like the variable/property scripts, and accessed using their constant script names instead. This would make a tween function look like:
TweenPlayOnce(tween_x, x__, 0, 100, 30, EaseInOutCubic);
This has the benefit of allowing others to more easily customize existing ease functions, or to add their own. It would then be up to you to manage which ease functions you want included with your project. The extra benefit with this method would be a slight performance gain overall.
I have since decided to leave the ease constants as they are. If people really need to customize or add ease functions, they can modify the ExecuteEase script contained within the GEX and add their own constants to access them. Plus, I found that the current method is actually faster than the method I was considering.
Feel free to give feedback on this, or to let me know if there is anything else you would like to see added to TweenGMS.
Edited by 8BitWarrior, 16 June 2013 - 07:56 AM.