Asset - Scripts TweenGMS - Tweening Engine

8BitWarrior

Member


Available on:
GameMaker Marketplace ($4.99)
Itch.io ($0/donation)


TweenGMS is an easy-to-use and flexible automated tweening engine.
With many years of development, it offers many essential and advanced features powered by an optimised codebase.
Quickly improve the look of your games by tweening movements, fades, rotations, animations, stats, and much more!

HTML5 Demo
Video Tutorials
Documentation

[ Features ]
  • Fire-and-forget tweening
  • Step and delta(seconds) timing
  • Time scale manipulation
  • Custom variable easing
  • Control groups
  • Event callbacks
  • Tween stepping
  • Delay management
  • Path resource easing
  • Optimised performance
  • Automatic memory management
  • Compatible with all target platforms
  • Supports persistent instances and rooms
  • Clean script documentation
  • ... and more!
 
Last edited:

8BitWarrior

Member
An early alpha build for the next major release is available for testing! (v0.9.80)
Please do not test it with existing projects, as it is NOT backwards compatible with previous versions.
And be warned, it isn't properly documented yet (at all), so I don't suggest trying it if not already familiar with TweenGMS.

You can download the alpha build from HERE
 
This looks amazing! Can't wait to try it out.
It is amazing indeed. I've done great things with this asset :D But someone knows if it is going to be adapted to GMS 2? I've tried to import it and adapt by myself but it's a bit arduous to clean all compatibility scripts and got it working right.
 

8BitWarrior

Member
An early alpha is now available for GameMaker Studio 2. Please be aware that it is only partially documented and is not compatible with previous versions of TweenGMS.
I am open to feedback and suggestions!

Download Link

The biggest changes are:
- Multi-property tweens are now supported.
- Properties now use a string (e.g. "x", "myVar")
- Custom variables don't require property setter scripts. (to be further documented later)
- TweenFire() now supports TweenFireTo() and TweenFireFrom(). (not yet supported by TweenCreate() or TweenPlay().
- TweenSimple*() scripts have been replaced with TweenEasy*() scripts
- Replaced TweenGet*() and TweenSet*() scripts with TweenGet() and TweenSet() which now take string labels.
- Added advanced property scripts (e.g. TPMap()) for tweening arrays, lists, grids, and maps.
- Reduced need for many scripts by removing Tween*All()/Tween*Target()/Tween*Group() scripts.
*** The new Tweens*() scripts are now used to select specified tweens. e.g. TweenPause(TweensAll()).

Anyhow, let me know what you guys think!
 
Last edited:

Arconious

Member
Very excited to make use of this in GMS2! Was very hopeful this extension would eventually be ported over. Looks like importing .yymp files is currently broken in GMS2, so I guess I just need to manually import from the example project (extension file + scripts I assume). Thank you for working on this and releasing it to us all!!
 

8BitWarrior

Member
Looks like importing .yymp files is currently broken in GMS2, so I guess I just need to manually import from the example project (extension file + scripts I assume).
Importing .yymp files works (at least for me) if you drag and drop the file into GMS2 from windows explorer. Let me know if that works!
 

8BitWarrior

Member
I have fixed a problem with the alpha version for GameMaker Studio 2 which caused an error when using play modes other than TWEEN_MODE_ONCE. Anyone using the alpha is heavily encouraged to download the latest version.
 
D

djrain

Guest
This extension is causing my build to fail for iPhone (using GMS2 for Mac). Works perfectly on the Mac test though. Any idea why that might be?

Here's what I assume is the relevant error:

/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono DONE (0)
System.DllNotFoundException: kernel32
at (wrapper managed-to-native) .: (string,./&)
at Igor.iOSBuilder.HandleExtensions () [0x0020f] in <bd91bca3df6b4338a96799a391f58a40>:0 Igor complete.

elapsed time 00:00:05.7152540s for command "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono" /Users/Shared/GameMakerStudio2/Cache/runtimes/runtime-2.1.0.135/bin/Igor.exe -options="/private/tmp/PKInstallSandbox.X0jjqz/GameMakerStudio2/GMS2TEMP/build.bff" -- iOS Run started at 08/25/2017 11:10:19
FAILED: Run Program Complete
 

8BitWarrior

Member
This extension is causing my build to fail for iPhone (using GMS2 for Mac). Works perfectly on the Mac test though. Any idea why that might be?

Here's what I assume is the relevant error:

/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono DONE (0)
System.DllNotFoundException: kernel32
at (wrapper managed-to-native) .: (string,./&)
at Igor.iOSBuilder.HandleExtensions () [0x0020f] in <bd91bca3df6b4338a96799a391f58a40>:0 Igor complete.

elapsed time 00:00:05.7152540s for command "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono" /Users/Shared/GameMakerStudio2/Cache/runtimes/runtime-2.1.0.135/bin/Igor.exe -options="/private/tmp/PKInstallSandbox.X0jjqz/GameMakerStudio2/GMS2TEMP/build.bff" -- iOS Run started at 08/25/2017 11:10:19
FAILED: Run Program Complete
Sorry for the late reply. Unfortunately, this error does't offer me any useful information, as I don't see anything specifically related to TweenGMS. I am going to assume that this is a bug with GameMaker Studio 2 for Mac. Please let me know if anything changes. I will let you know if I come across any useful information.

Edit:
Are you using TweenGMS from the marketplace, or are you using the alpha build linked at the top of this page?
 
D

djrain

Guest
Sorry for the late reply. Unfortunately, this error does't offer me any useful information, as I don't see anything specifically related to TweenGMS. I am going to assume that this is a bug with GameMaker Studio 2 for Mac. Please let me know if anything changes. I will let you know if I come across any useful information.

Edit:
Are you using TweenGMS from the marketplace, or are you using the alpha build linked at the top of this page?
Thanks for the reply. Fortunately, I discovered today that in the latest version of GMS2 the problem seems to have disappeared.

I'm using the alpha v0.9.80 which I downloaded from the marketplace description. (I'm assuming they're the same?)
 

8BitWarrior

Member
I'm using the alpha v0.9.80 which I downloaded from the marketplace description. (I'm assuming they're the same?)
Yup! This page and the marketplace listing both link to the same download.
I'm hoping to officially launch to the marketplace for GMS2 later this week. I am just waiting on an HTML5 fix in a coming GameMaker update.
 

8BitWarrior

Member
An updated version of TweenGMS (v0.9.8) is now available for GameMaker Studio 2!
Please be aware that this version has significant changes from previous versions which are not backwards compatible. Please see the included documentation for more details.

Version 0.9.8 will arrive on GMS 1.4 at a later date.

A few of the notable changes:

- Property setter scripts are no longer required to tween custom variables
- Property arguments now take a string ("x") instead of script (x__)
- Tweens now support multiple variables
- Added TweenFireTo() and TweenFireFrom()
- New TweenGet() and TweenSet() scripts have replaced all TweenGet*() and TweenSet*() variants
- Improved script reference documentation
- Cleaner code base and removal of many redundant scripts
 
Last edited:

8BitWarrior

Member
TweenGMS has been updated to v0.9.82 with fixes for TweenFinish() and TweenFinishDelay(). This only affects GameMaker Studio 2.
 
R

RargraveEntertainment

Guest
Just wanted to add my thanks for such a great library. I haven't had a chance to try 0.9.83 yet but have enjoyed 0.9.74 with GM:S 1.4..
 

8BitWarrior

Member
Just wanted to add my thanks for such a great library. I haven't had a chance to try 0.9.83 yet but have enjoyed 0.9.74 with GM:S 1.4..
Happy to hear that!

Just as a side note, v0.9.83 breaks some previous conventions. More specifically, TweenFire(), TweenCreate(), and TweenPlay() have been updated to allow for multiple properties:
e.g. TweenFire(id, EaseLinear, 0, true, 0.0, 1.0, "x", x, mouse_x, "y", y, mouse_y);

It would be best to wait for a new clean project to try things out.
 
R

RargraveEntertainment

Guest
Thanks, I'll update soon as that multiple property fire sounds really useful.

One problem I haven't been able to figure out is if I have a project that is working fine, as soon as I save it to a network share folder, when I run I get this error:
"Could not locate initialization function TGMS_Ext_Init"

If I completely remove the extension and then re-add it this seems to fix the problem, but it makes switching which computer I'm working on a bit tricky :).

Any thoughts or ideas?

Thanks again for such a great library, without it I wouldn't have ever learned about tweens.
 

8BitWarrior

Member
One problem I haven't been able to figure out is if I have a project that is working fine, as soon as I save it to a network share folder, when I run I get this error:
"Could not locate initialization function TGMS_Ext_Init"

If I completely remove the extension and then re-add it this seems to fix the problem, but it makes switching which computer I'm working on a bit tricky :).

Any thoughts or ideas?.
Hmm... not totally sure what is going on.
Is TGMS_Setup.gml appearing in the TweenGMS extension folder? If that isn't being transferred properly, it would lead to that issue. Otherwise, you could delete TGMS_Setup.gml and manually call TGMS_Init() to initialize TweenGMS once at startup.
 
R

RargraveEntertainment

Guest
Thanks for the hint. That's the problem, I'm not sure why, but when I save to a network folder the 'extensions' sub folder has "TweenGMS.extension.gmx" and the folder "TweenGMS" but the "TweenGMS" folder is empty.

If I copy the contents of the "TweenGMS" folder from a local drive save over things work as expected. Much easier than re-installing the whole extension.
 

8BitWarrior

Member
TweenGMS has been updated to version 0.9.84.

The Amazon Fire target has been added to "Copies To:" and many corrections have been made to the Script Reference documentation.
 

8BitWarrior

Member
I have a way to greatly boost TweenGMS performance for YYC targets, but it'd require quite a bit of work on my end to set it up. I'm just wondering if any users out there could make use of extra performance gains, particularly for mobile targets. Otherwise, I could focus my time on adding new features instead... when I get around to them!

Update:
Never mind! After some testing, it seems that array access is now faster than ds_grid access for YYC targets. This wasn't the case, some time ago. Free gains, ftw!
 
Last edited:

8BitWarrior

Member
TweenGMS v0.9.84 is now live for GameMaker Studio 1.4 users. This brings it in line with the GameMaker Studio 2 version.

Be warned that this version has breaking changes from the previous version. I do not suggest upgrading large existing projects.
Please review documentation to see what has been changed.
 

8BitWarrior

Member
A note for GameMaker 1.4 users. The current version (v0.9.84) is currently broken when downloading through "My Library" in GameMaker. Please download the latest version directly from the marketplace listing instead.

[Update]
This issue has been fixed.
 
Last edited:

8BitWarrior

Member
TweenGMS has officially launched as version 1.0 for GameMaker 1.4 and GameMaker Studio 2.

As is, it is now considered feature complete and stable. Additional features may be added in the future, but no promises at this point. :squirrel:
 

8BitWarrior

Member
Looking for some feedback on an idea.
I am considering adding a feature which would optionally round eased values. This could be achieved by using an "r:variable" token for properties. So, for example...

TweenFire(id, EaseLinear, 0, 0, 0, 1, "r:x", x, mouse_x, "r:y", y, mouse_y);

That would round the eased values of x and y without having to manually round them elsewhere. There could also be variants added for flooring and ceiling, "f:var" and "c:var", respectively.

Anyhow! Would anyone find this useful?
 

8BitWarrior

Member
TweenGMS update v1.0.2 is now available for GameMaker Studio 1.4 and GameMaker Studio 2.

The major feature of this update is a new script called TweenMore(). This script allows you to easily chain tweens to play one after another.
Code:
// Chain various tweens to fire one after another
tween1 = TweenFire(id, EaseOutBounce, 0, true, 0, 1.0, "y", -100, y);
tween2 = TweenMore(tween1, id, EaseInOutQuad, 0, true, 0, 0.5, "image_yscale", 1, 0.25);
tween3 = TweenMore(tween1, id, EaseInOutSine, 0, true, 0, 1.0, "image_angle", 0, 360);
tween4 = TweenMore(tween3, id, EaseInOutQuad, 0, true, 0, 2.0, "image_xscale", 1, 0.5);

Another script added is TweenDefine(), allowing tweens to easily be defined or redefined as needed.
Code:
// Create an undefined tween, then define it with TweenDefine() before playing
tween = TweenCreate(id);
TweenDefine(tween, EaseOutQuad, TWEEN_MODE_ONCE, false, 0, 30, "x", x, mouse_x);
TweenPlay(tween);
 

N8M8

Member
I hate to use this thread to ask the question, but I'm not sure where else to go besides PMing the maker...

I am trying to figure out how to get a tween to animate while a key is held down, and then to revert to it's starting position (looks like I'd do this using a callback at the end of the initial tween) when it is let go.

Is there some base-level reading on how tweens work that could give me insight into how to do this? Googling hasn't helped a ton...

Thanks!
 
Last edited:

8BitWarrior

Member
I am trying to figure out how to get a tween to animate while a key is held down, and then to revert to it's starting position (looks like I'd do this using a callback at the end of the initial tween) when it is let go.
You could do something like...
Code:
/// CREATE EVENT
tween = TweenCreate(id);

/// KEY PRESSED EVENT
TweenPlay(tween, EaseLinear, 0, true, 0, 1.0, "x", 0, 100); // Play tween

/// KEY RELEASE EVENT
TweenPlay(tween) // This will restart the tween to start position
TweenStop(tween); // Then immediately stop the tween
Have you looked at the Demo Project for some basic examples?
Feel free to PM if you like. You can also contact me through the marketplace listing.
 
Last edited:

8BitWarrior

Member
I recently decided to set TweenGMS as a paid asset on the GameMaker Marketplace. This is with the hopes to promote asset creators being rewarded for their efforts. On the flip side, it also promotes consumers placing value on the products they use.

However, TweenGMS will remain available for free through a 3rd party site. The license has also remained open source, so you can still do with it as you like.
 
Last edited:

8BitWarrior

Member
TweenGMS update v1.0.5 is now available on the marketplace.
This update resolves warnings with the YYC compiler and other syntax errors.
Adjustments have also been made to the TweenMore() script for improving expected behavior.
In addition to the example projects being cleaned up, a new GUI Button example has also been added. This could be useful for those wanting to use the GUI layer for interactive UI elements.

This update is safe for adding to existing projects, as it presents no breaking changes.
However, a larger 1.1.0 update is in the works and DOES include breaking changes. Please consider carefully when updating past v1.0.5, as it may require you to make changes to your existing code.

Take care, all!
 
Top