MODULE: TWEEN 2.1.0 with AGS 3.4.0 support!

Started by edmundito, Sun 01/03/2015 19:27:23

Previous topic - Next topic

daneeca

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

edmundito

Quote from: daneeca on Thu 21/04/2016 22:49:10
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?
The Tween Module now supports AGS 3.6.0!

Crimson Wizard

Edmundito, daneeca just replied 1 post above:

Quote from: daneeca on Sun 24/04/2016 15:37:27
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

Quote from: Crimson Wizard on Mon 02/05/2016 01:00:12
Edmundito, daneeca just replied 1 post above:

Quote from: daneeca on Sun 24/04/2016 15:37:27
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!
The Tween Module now supports AGS 3.6.0!

Amayirot Akago

For a beginning AGS'er like myself, this module is a life-saver :D
Quote from: CaptainDMy 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

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

Need help? I started a chat room on Discord:
https://discord.gg/vmuCyWX

(also updated the main post with the chat link.)
The Tween Module now supports AGS 3.6.0!

.M.M.

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: ags

     Display("Viewport: %d,%d", GetViewportX(), GetViewportY());
     mc_x = character[i_start].x-System.ViewportWidth/2;
     mc_y = character[i_start].y-System.ViewportHeight/2;
     TweenViewport(20.0, mc_x, mc_y, eEaseOutSineTween, eBlockTween, 0.0, eTweenSpeed);
     //SetViewport(mc_x, mc_y);
     Display("Move x,y: %d,%d[Viewport: %d,%d", mc_x, mc_y, GetViewportX(), GetViewportY());

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: ags

     Display("Viewport: %d,%d", GetViewportX(), GetViewportY());
     SetViewport(mc_x, mc_y);
     Display("Move x,y: %d,%d[Viewport: %d,%d", mc_x, mc_y, GetViewportX(), GetViewportY());

ViewportX;Y is 680;320 at start, 480;60 at end. Variables mc_x;y 480;60.

edmundito

#28
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: ags
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.
The Tween Module now supports AGS 3.6.0!

edmundito

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!
The Tween Module now supports AGS 3.6.0!

Amayirot Akago

Yaaaaay! :D This is sure to come in handy if and when I ever get around to making another AGS game!
Quote from: CaptainDMy 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

I found this demo that may be used to visualize object tweening across 2d plane: http://gizma.com/easing

.M.M.

Thank you for the reply, fix and the whole TWEEN module! :)

Danvzare

Quote from: .M.M. on Sun 11/12/2016 11:12:49
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

eri0o

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: ags
int aVariable;

game_start(){
  aVariable = 10;
}

void something(){
  aVariable.Tween(1.5, 70, eEaseLinearTween, eNoBlockTween);
}

eri0o

#35
If someone came here, the new version is here -> https://www.adventuregamestudio.co.uk/forums/index.php?topic=57315.0

eri0o

Edmundito stealthly updated the top post on this thread, now my previous comment is wrong!

SMF spam blocked by CleanTalk