TweenGMS 2 Beta 4 (HTML5 Fix)


TweenGMS 2 Beta 4 is now available for download!

The HTML5 target is once again supported! Other various changes have been made "under the hood", so please let me know if you find any issues and I will try to fix them quickly.

Please read the other changes below...

======================
 Changes Since Beta 3
======================
-HTML5 fixes!
-TPFunc*() now supports struct targets
-TPFunc() now properly binds method/function to set target environment
-Removed TPFuncX()
    ** TPFunc() now requires a target to help prevent errors caused by assuming wrong target environment
    
-Modified "normalized duration" calculation to be divided by the number of properties
    ** You may need to adjust for this change! Please test this change if you've used normalized durations!
-Shared tweener now created immediately at very start of game
    ** Do not destroy or deactivate o_SharedTweener
-Ease algorithms must now be methods or animation curve channels -- function ids no longer supported!!
    ** EaseFunction = function() { ... } // SUPPORTED
       function EaseFunction() { ... }   // NOT SUPPORTED -- please convert to method
-Fixed TGMS_FetchTween mishandling structs
    ** Caused errors with {group: 0} and {tween: tID} when attempting to select tweens
-Added EaseChannel()
    ** Naming convention may change in the futurue
    
-Fixed image_blend... again?
-Fixed TweenSet(tID, "group", 0) not working when trying to assign group
-Improved TweenSet() and TweenGet() -- still in progress
-Added support for property methods inside struct targets
-Improved performance when easing with ease *functions* (not curves)
-Changed tween default to use CurveLinear instead of EaseLinear -- improved performance
-Prevented possible issue where manually creating shared tweener can cause conflict
-Moved default property methods into the global {TGMS} struct environment
-Changed built-in properties to methods -- improves performance
-Added optimised default properties for variables 'z', 'depth', 'friction', 'gravity', 'gravity_direction'
-Fixed ("-time",10) and "=10" not setting time inside Tween*() calls
-Fixed bug with TweenPause() trying to access an non-existing script
-Event map now marks event lists -- may improve tween destruction performance for tweens with event callbacks
-Removed TweenGMS extension file
-Removed TGMS_NULL()

Files

TweenGMS 2.0 Beta 4 (Requires GMS 2.3.1) 67 kB
Dec 30, 2020

Get TweenGMS

Comments

Log in with itch.io to leave a comment.

Hi, I'm trying this latest version and with any Tween I get an error with TGMS_EasyUseDelta not set before reading it.

___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object Object2:
global variable name 'TGMS_EasyUseDelta' index (100193) not set before reading it.
 at gml_Script_TweenEasyScale (line 35) -        __TweenEasyScale = TweenFire(id, ease, argument_count == 8 ? argument[7] : 0, global.TGMS_EasyUseDelta, delay, duration, "image_xscale", x1, x2, "image_yscale", y1, y2);
############################################################################################
gml_Script_TweenEasyScale (line 35)
gml_Object_Object2_Create_0 (line 4) - TweenEasyScale( 0, 0, 1, 1, 0, 1*room_speed);

I will look into this. Thanks for letting me know.

(1 edit)

I think a temporary fix is to place o_SharedTweener into your game's first room. The object is *supposed* to be automatically created, but it looks like it isn't for your project.

Let me know if that helps for now. I will need to look into this some more.

Also! If you haven't already, I encourage you to clear your project's compiler cache. (CTRL+F7)

(+1)

I have found the problem!

The object has a Tween in his create code, so it appears with a popping effect.
I dragged the object in the room via the room editor and the error occurred.
Then I instanced o_SharedTweener in the room creation code and I got all different errors.
So I removed the object from the room editor and instanced it in the room creation code and all worked fine!
No need to manually create o_SharedTweener

With previous versions I always placed some objects (eg. start button, etc..) in the first room via room editor drag n drop, and the tweens in their create event always worked fine.

If this behaviour is intended, I suggest to mention it in the documentation, when it will reach final stage.

Thank you for your support!!

Oh, this makes sense! I see what is going on now.
Yeah, I will need to adjust some things or mention this in the documentation.
One option is to create an initial room which immediately goes to the next room. That should allow you to use the room editor again for the object.

Thanks for getting back to me. This information is helpful!

I have uploaded Beta 4.1 which should fix the issue you mentioned :)

It works fine!

And best wishes for a happy new year!!

Good to hear!

Happy new year :)