Mittens 2018 will be in Boston this September. There are three spaces left, so check out the thread for details!

Author Topic: MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!  (Read 13824 times)

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!
« on: 01 Mar 2015, 19:27 »
The AGS Tween Module allows you to programmatically interpolate many of the AGS properties (objects, characters, regions, viewport, audio, gui, gui controls, etc.) over time in amazing ways. The term tween comes from "inbetweening". It's typically used in Adobe Flash to indicate interpolation of an object from one keyframe to another.

Instead of depending on while loops everywhere in your code:
Code: Adventure Game Studio
  1. while (gIconbar.Y > -gIconbar.Height) {
  2.   gIconbar.Y = gIconbar.Y - 1;
  3.   Wait(1);
  4. }

You can do this:
Code: Adventure Game Studio
  1. gIconbar.TweenY(0.5, -gIconbar.Height, eEaseInBackTween);

Notable games using the tween module include: A Golden Wake, Primordia, the Ben Jordan series, and Gemini Rue.

---

Tween 2.x is a huge upgrade from Tween 1.x. It is closer to the vision I had when I first started working on the first Tween module while still keeping the simplicity of the original.

Major changes include:

New Easing Functions

The new easing functions are based on common easing functions used by other tween modules. These include elastic, bouncing, backing out, etc.
You can see a demo of these at http://easings.net.

Stop Individual Tweens

You can now stop individual tweens:

Code: Adventure Game Studio
  1. cEgo.TweenPosition(2.0, 100, 100, eEaseLinearTween, eReverseRepeatTween);
  2.  
  3. // ... Later:
  4. cEgo.StopTweenPosition();

Tween by SPEED

You can tween ANYTHING by speed instead of seconds as well. This allows you to move objects at a constant speed regardless of where they are.

Start Delay

You can delay the start of any tween allowing you to create interesting effects.

Convenient fade out and fade in tween functions

Code: Adventure Game Studio
  1. gIconbar.TweenFadeOut(0.5);

Custom Tweens

For the advanced users who like to have control, you can also create your own custom tweens that take advantage of the module's easing and timing functions. This also allows you to create tweens for drawing surfaces.

Code: Adventure Game Studio
  1. function TweenIndyMapLine(int fromX, int fromY, int toX, int toY) {
  2.   Tween.IncreaseGameSpeed();
  3.  
  4.   Tween myTweenX;
  5.   Tween myTweenY;
  6.   myTweenX.Init(3.0, fromX, toX);
  7.   myTweenY.Init(3.0, fromY, toY);
  8.   int previousX = FloatToInt(myTweenX.FromValue);
  9.   int previousY = FloatToInt(myTweenY.FromValue);
  10.   int drawColor = Game.GetColorFromRGB(255, 0, 0);
  11.  
  12.   while (myTweenX.IsPlaying() || myTweenY.IsPlaying()) {
  13.     myTweenX.Update();
  14.     myTweenY.Update();
  15.    
  16.     DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
  17.     surface.DrawingColor = drawColor;
  18.     surface.DrawLine(previousX, previousY, myTweenX.Value, myTweenY.Value, 3);
  19.     surface.Release();
  20.    
  21.     previousX = myTweenX.Value;
  22.     previousY = myTweenY.Value;
  23.    
  24.     Wait(1);
  25.   }
  26.    
  27.   Tween.RestoreGameSpeed();
  28. }

No longer compatible with AGS 2.x!

If you would like to use the tween module with an AGS 2 game, then get the Tween 1.x module.

---

Download from:
https://github.com/edmundito/ags-tween/releases/tag/v2.1.0

Documentation:
http://ags-tween.readthedocs.io/en/v2.1.0/

Support Chat:
https://discord.gg/vmuCyWX

Issues and Feature Planning:
https://github.com/edmundito/ags-tween/issues

Special Thanks to:
Tzachs for expanding the original module to support most of the properties in AGS, Grundislav and Dualnames for promoting and creating very inspiring work with the original module, jwalts37 who I met in person at GDC 2014 and told me how much he liked the module, Vince Twelve for showing me some advanced code that was the inspiration for Tween 2's startDelay, Calin Leafshade for giving me more insight into scripting best practices, and everyone in the forum for reporting problems and making games with this.
« Last Edit: 05 Dec 2016, 00:33 by Edmundito »
Start using the Tween 2 Module!

Ibispi

    • I can help with making music
    •  
    • I can help with play testing
    •  
    • Ibispi worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.0)
« Reply #1 on: 01 Mar 2015, 20:49 »
Tween module is my favorite module! Congratulations on new version release! :-)
Thanks Edmundito, and everyone else who worked on it!
« Last Edit: 01 Mar 2015, 20:52 by BSP »

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on a game that was nominated for an AGS Award!
      Dualnames worked on a game that won an AGS Award!
Re: MODULE: TWEEN 2! (2.0.0)
« Reply #2 on: 02 Mar 2015, 01:08 »
Stickied, Tween module is the single best thing out of an AGS script.
No more military army stuff. I'm alive and back.

Re: MODULE: TWEEN 2! (2.0.0)
« Reply #3 on: 05 Jun 2015, 09:18 »
history and maths of tweening:

Re: MODULE: TWEEN 2! (2.0.0)
« Reply #4 on: 24 Jun 2015, 12:33 »
Awesome!
_______________________________________ ____________________

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #5 on: 12 Jul 2015, 23:27 »
2.0.1 now available with a minor fix related to Character, Object, or GUI FadeIn FadeOut tweens. Thanks to Blackthorne!
Start using the Tween 2 Module!

Blackthorne

  • Infamous Quests
    • Blackthorne worked on a game that was nominated for an AGS Award!
      Blackthorne worked on a game that won an AGS Award!
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #6 on: 17 Jul 2015, 14:22 »
2.0.1 now available with a minor fix related to Character, Object, or GUI FadeIn FadeOut tweens. Thanks to Blackthorne!

No problem! Thanks to YOU!!

Bt
-----------------------------------
"Enjoy Every Sandwich" - Warren Zevon

http://www.infamous-quests.com

Re: MODULE: TWEEN 2! (2.0.1)
« Reply #7 on: 19 Jul 2015, 14:56 »
The GUI."resize" tween pivots to the top left ot the GUI, and i assume thats the same for dynamicsprites...

having a function that somehow manages to set the scaling pivot, the point of the image that doesnt move when resizing, percentually with a float. That is whats missing for me.

Re: MODULE: TWEEN 2! (2.0.1)
« Reply #8 on: 29 Jul 2015, 12:39 »
Thanks! :P
_______________________________________ ____________________

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #9 on: 29 Jul 2015, 19:07 »
Many many thanks for creating and sharing this! (nod)(nod)(nod)
I need to give this one a try, love the possibilities already! (laugh)(roll)
There are those who believe that life here began out there...

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #10 on: 10 Oct 2015, 22:04 »
Quick update: I've set up a public Skype chat if you'd like to have some live support or chat about tween module techniques:

Tween Module Skype Chat Group: https://join.skype.com/CsrRAc17CJIb

(Also updated the main post with this info!)
« Last Edit: 12 Nov 2015, 19:20 by Edmundito »
Start using the Tween 2 Module!

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #11 on: 11 Oct 2015, 05:52 »
The GUI."resize" tween pivots to the top left ot the GUI, and i assume thats the same for dynamicsprites...

having a function that somehow manages to set the scaling pivot, the point of the image that doesnt move when resizing, percentually with a float. That is whats missing for me.

Oh yeah, that's a fairly advanced issue that maybe I can look into including into the module. I've added it as an idea in the github issue tracker:
https://github.com/edmundito/ags-tween/issues/3

In the meantime, here is a function that can resize the GUI with the pivot, you can update it to fit the object that you need:

Add this to your Global Script or a Module Script:
Code: Adventure Game Studio
  1. int TweenSizeFromPivot(this GUI*, Pivot pivot, float timing, int toWidth, int toHeight, TweenEasingType easingType, TweenStyle style, float startDelay, TweenTimingType timingType) {
  2.   int toX = this.X;
  3.   int toY = this.Y;
  4.  
  5.   if (pivot == ePivotTopCenter || pivot == ePivotMiddleCenter || pivot == ePivotBottomCenter) {
  6.     toX += (this.Width - toWidth) / 2;
  7.   } else if (pivot == ePivotTopRight || pivot == ePivotMiddleRight || pivot == ePivotBottomRight) {
  8.     toX += (this.Width - toWidth);
  9.   }
  10.  
  11.   if (pivot == ePivotMiddleLeft || pivot == ePivotMiddleCenter || pivot == ePivotMiddleRight) {
  12.     toY += (this.Height - toHeight) / 2;
  13.   } else if (pivot == ePivotBottomLeft || pivot == ePivotBottomCenter || pivot == ePivotBottomRight) {
  14.     toY += (this.Height - toHeight);
  15.   }
  16.  
  17.   int sizeDuration = this.TweenSize(timing, toWidth, toHeight, easingType, eNoBlockTween, startDelay, timingType);
  18.   int positionDuration = this.TweenPosition(timing, toX, toY, easingType, eNoBlockTween, startDelay, timingType);
  19.   if (style == eBlockTween) {
  20.     WaitForLongest(sizeDuration, positionDuration);
  21.   }
  22. }

Add this to your Global Script Header or a Module Header:
Code: Adventure Game Studio
  1. enum Pivot {
  2.     ePivotTopLeft,
  3.     ePivotTopCenter,
  4.     ePivotTopRight,
  5.     ePivotMiddleLeft,
  6.     ePivotMiddleCenter,
  7.     ePivotMiddleRight,
  8.     ePivotBottomLeft,
  9.     ePivotBottomCenter,
  10.     ePivotBottomRight
  11. };
  12.  
  13. import int TweenSizeFromPivot(this GUI*, Pivot pivot, float timing, int toWidth, int toHeight, TweenEasingType easingType=Tween_EASING_TYPE_GUI, TweenStyle style=Tween_STYLE_GUI, float startDelay=Tween_START_DELAY_GUI, TweenTimingType timingType=Tween_TIMING_GUI);

Simple Usage:
Code: Adventure Game Studio
  1. gIconbar.TweenSizeFromPivot(eBottomRight, 0.5, 160, 120);
« Last Edit: 11 Oct 2015, 06:18 by Edmundito »
Start using the Tween 2 Module!

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #12 on: 18 Dec 2015, 17:36 »
I didn't find how to set a tween based on speed rather than duration, as advertised (I'm sure it's here somewhere but it eludes me).

EDIT: OK, found it: TimingType
« Last Edit: 18 Dec 2015, 17:45 by Monsieur OUXX »
 

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #13 on: 18 Dec 2015, 18:03 »
Suggestion for next version:

Make it easier to bind together some tweens (one for X, and one for Y, and why not one for altitude, etc.), based on a shared movement speed.

Let me explain what I mean:

Imagine you have a room Object that you want to move at a given speed. Then you can simply use Object.TweenPosition along with TimingType == eTweenSpeed. The module takes charge of calculating the duration matching that speed, and then updates both X and Y automatically with the appropriate ratio applied to each of them (namely: cos, and sin).

However, now, imagine you want to do the same with your very own abstract Tween object, that you will use for drawing onto surfaces. Very much the same as you do in the "Indy map example" in the first post. Then it's a pain to calculate the duration and the ratios by hand. You didn't have to do it in your example because you simply set the same duration (3.0) to both X and Y.

It's not too hard to do it, but if you created a class for an abstract (X,Y) tween (not relying on an actual AGS Object or Character or whatnot) that would be really cool...
 

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #14 on: 19 Dec 2015, 03:57 »
Suggestion for next version:

Make it easier to bind together some tweens (one for X, and one for Y, and why not one for altitude, etc.), based on a shared movement speed.

Let me explain what I mean:

Imagine you have a room Object that you want to move at a given speed. Then you can simply use Object.TweenPosition along with TimingType == eTweenSpeed. The module takes charge of calculating the duration matching that speed, and then updates both X and Y automatically with the appropriate ratio applied to each of them (namely: cos, and sin).

However, now, imagine you want to do the same with your very own abstract Tween object, that you will use for drawing onto surfaces. Very much the same as you do in the "Indy map example" in the first post. Then it's a pain to calculate the duration and the ratios by hand. You didn't have to do it in your example because you simply set the same duration (3.0) to both X and Y.

It's not too hard to do it, but if you created a class for an abstract (X,Y) tween (not relying on an actual AGS Object or Character or whatnot) that would be really cool...

Hey, interesting idea, glad to see that some of the new fancy features are getting pushed to the limit.

I was wondering two things:

Is this specific to creating custom Tweens or for other types of combinations as well? Could you give me some examples of things you were trying to do with speed that the module did not support?

Can tell me more about "altitude" and how it relates in AGS?
Start using the Tween 2 Module!

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: MODULE: TWEEN 2! (2.0.1)
« Reply #15 on: 19 Dec 2015, 12:12 »
Is this specific to creating custom Tweens or for other types of combinations as well? Could you give me some examples of things you were trying to do with speed that the module did not support? Can tell me more about "altitude" and how it relates in AGS?

It's strictly for Tweens, and as I said you already did it inside the module to manage X and Y simultaneously in objects (Chracters, Guis, etc.) that have both a X and a Y.
I gave an example: manage my own objects that have a X and a Y property.
Don't stay focused on "altitude". It could be anything, for example a "Z" if you manage a 3-dimensional space.

Long things short: a way to tween more than 1 property at once, based on the speed. It's alreayd possible in the module, but one has to understand how to relate speed to FPS. A tiny utility class would make that easier.

 

Re: MODULE: TWEEN 2! (2.0.2)
« Reply #16 on: 21 Apr 2016, 18:54 »
Hi!
I wanted to try it, but I got an error message:
"Tween.asc(212): Error (line 212): 'max' is a global var; cannot use as name for local"

Maybe It's not working with AGS 3.4.0.6? :/

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #17 on: 21 Apr 2016, 19:23 »
Hi!
I wanted to try it, but I got an error message:
"Tween.asc(212): Error (line 212): 'max' is a global var; cannot use as name for local"

Maybe It's not working with AGS 3.4.0.6? :/

Hi! I have actually not tested it on 3.4 yet, but maybe I should. I'll take a look at it this weekend. I've created a bug report in:
https://github.com/edmundito/ags-tween/issues/7

If anyone else is testing in 3.4.x, please let me know what works for you and what doesn't. If you'd like to see some new tween supported for 3.4 features please let me know as well.
Start using the Tween 2 Module!

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #18 on: 21 Apr 2016, 20:15 »
AGS 3.4.0.6 does not have any "max" global variables.
daneeca, do you have any modules before Tween which has such variable declared in the header? Or any game object named "max"? Or variable called "max" on the Global Variables pane?
« Last Edit: 21 Apr 2016, 20:22 by Crimson Wizard »

Re: MODULE: TWEEN 2! (2.0.2)
« Reply #19 on: 21 Apr 2016, 22:49 »
I have the Smooth Scrolling & Parallax module and a global variable named "max".
So, maybe this is the problem. If I rename the max global variable it probably will work. I'll try it tomorrow and report the results.

Thanks for the help!

Re: MODULE: TWEEN 2! (2.0.2)
« Reply #20 on: 24 Apr 2016, 15:37 »
Yes, that was the problem. It's working now. This module is awesome! :)
Thanks again and sorry for my clumsiness.

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #21 on: 30 Apr 2016, 18:00 »
I have the Smooth Scrolling & Parallax module and a global variable named "max".
So, maybe this is the problem. If I rename the max global variable it probably will work. I'll try it tomorrow and report the results.

Thanks for the help!

daneeca, Were you able to test this?
Start using the Tween 2 Module!

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #22 on: 02 May 2016, 01:00 »
Edmundito, daneeca just replied 1 post above:

Yes, that was the problem. It's working now. This module is awesome! :)
Thanks again and sorry for my clumsiness.

Apparently there was simply a global variable of that name.

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #23 on: 08 May 2016, 18:24 »
Edmundito, daneeca just replied 1 post above:

Yes, that was the problem. It's working now. This module is awesome! :)
Thanks again and sorry for my clumsiness.

Apparently there was simply a global variable of that name.

Oooh, totally missed that Page 2!
Start using the Tween 2 Module!

Amayirot Akago

  • AGS aficionado.
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #24 on: 05 Jun 2016, 14:45 »
For a beginning AGS'er like myself, this module is a life-saver :D
Quote from: CaptainD
My suspicion is that an accident, probably caused by a lightning storm and a mad professor, resulted in Amayirot's brain becoming inextricably linked to the databases behind MobyGames and LemonAmiga.

Stupot

    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #25 on: 06 Jun 2016, 08:46 »
Just a thought. Sorry if this has already been suggested (or even done?) but has anyone thought about integrating SSH's credits module with the Tween module? I've noticed a few games lately with lovely smooth things happening on screen but then a really (relatively) jerky final credits.

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #26 on: 03 Sep 2016, 00:22 »
Need help? I started a chat room on Discord:
https://discord.gg/vmuCyWX

(also updated the main post with the chat link.)
Start using the Tween 2 Module!

Re: MODULE: TWEEN 2! (2.0.2)
« Reply #27 on: 23 Nov 2016, 14:33 »
Hi, this is absolutely great module with endless count of useful applications! Hovewer, I have a problem with one type of tween, TweenViewport. For some reason, I can't get it to work as I need. This is the code:
Code: Adventure Game Studio
  1.      Display("Viewport: %d,%d", GetViewportX(), GetViewportY());
  2.      mc_x = character[i_start].x-System.ViewportWidth/2;
  3.      mc_y = character[i_start].y-System.ViewportHeight/2;
  4.      TweenViewport(20.0, mc_x, mc_y, eEaseOutSineTween, eBlockTween, 0.0, eTweenSpeed);
  5.      //SetViewport(mc_x, mc_y);
  6.      Display("Move x,y: %d,%d[Viewport: %d,%d", mc_x, mc_y, GetViewportX(), GetViewportY());
  7.  
It should move the camera so that the character with ID i_start is in the centre of viewport. However, it moves the Viewport in completely different direction. In my test, ViewportX;Y is 680;320 at start, 60;60 at end. Variables mc_x;y are 480;60 - I don't see any simple way how to make a vector out of these variables.
This code runs exactly as it should be:
Code: Adventure Game Studio
  1.      Display("Viewport: %d,%d", GetViewportX(), GetViewportY());
  2.      SetViewport(mc_x, mc_y);
  3.      Display("Move x,y: %d,%d[Viewport: %d,%d", mc_x, mc_y, GetViewportX(), GetViewportY());
  4.  
ViewportX;Y is 680;320 at start, 480;60 at end. Variables mc_x;y 480;60.

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2! (2.0.2)
« Reply #28 on: 23 Nov 2016, 18:17 »
Hi .M.M, thanks for posting. You're right, there is a bug with TweenViewport in 2.0.x and I should have released a patch sooner.

Basically, it's Tweening the X part of the viewport with the Y value. In the meantime, you can open the Tween.asc file and find the line:

Code: Adventure Game Studio
  1. else if (this.Type == _eTweenViewport) {

And then modify the next lines to look correct. Here is the change that I made that has not been released:

https://github.com/edmundito/ags-tween/commit/99c36adc60f10a793c49115467ee088de514791e?diff=split

If you're not familiar with Github, red means old, and Green means new, the stronger highlights within the lines indicate exactly what I changed.
« Last Edit: 23 Nov 2016, 18:20 by Edmundito »
Start using the Tween 2 Module!

Edmundito

  • Mittens Serf
    • Best Innovation Award Winner 2014, for 'Tween Module'
    •  
    • I can help with scripting
    •  
    • Edmundito worked on a game that was nominated for an AGS Award!
Re: MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!
« Reply #29 on: 05 Dec 2016, 00:36 »
Hey everyone, thanks for all the feedback! I finally got around to supporting many features found in 3.3.0 and 3.4.0. This is the first major release since the release of 2.0.0!

More details can be round in the release notes:
https://github.com/edmundito/ags-tween/releases/tag/v2.1.0

And yeah, it fixes the TweenViewport bug!
Start using the Tween 2 Module!

Amayirot Akago

  • AGS aficionado.
Re: MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!
« Reply #30 on: 08 Dec 2016, 09:01 »
Yaaaaay! :D This is sure to come in handy if and when I ever get around to making another AGS game!
Quote from: CaptainD
My suspicion is that an accident, probably caused by a lightning storm and a mad professor, resulted in Amayirot's brain becoming inextricably linked to the databases behind MobyGames and LemonAmiga.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!
« Reply #31 on: 08 Dec 2016, 16:16 »
I found this demo that may be used to visualize object tweening across 2d plane: http://gizma.com/easing

Re: MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!
« Reply #32 on: 11 Dec 2016, 11:12 »
Thank you for the reply, fix and the whole TWEEN module! :)

Danvzare

  • The Man with No Name
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re: MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!
« Reply #33 on: 12 Dec 2016, 12:01 »
Thank you for the reply, fix and the whole TWEEN module! :)
Same here. Thanks so very much for the TWEEN module as a whole.
It's definitely one of the best modules for AGS, and a real life saver. :-D

Re: MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!
« Reply #34 on: 17 Dec 2017, 15:02 »
Hey! I am trying to understand Custom Tweens. I have a int variable that I want to tween. The code below is pseudo-code to explain this idea. How to do this?

Code: Adventure Game Studio
  1. int aVariable;
  2.  
  3. game_start(){
  4.   aVariable = 10;
  5. }
  6.  
  7. void something(){
  8.   aVariable.Tween(1.5, 70, eEaseLinearTween, eNoBlockTween);
  9. }