[Behavior] LiteTween

Post your completed addons to share with the community

Post » Sun Aug 19, 2012 11:22 pm

Mr. Newt just got me hooked on this plugin. Very nice!
B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Post » Sun Aug 26, 2012 12:36 am

EaseTween version 1.5 (experimental)

There're alot of changes I made since 1.4.
One of my concern for easeTween is that several action and combination of parameter behaves very strangely.
One example would be 1.4 reverse action.
People would expect that reverse action plays the animation backward, no matter when you called it. However in 1.4 it only play the tween in reverse if you already played the animation once. The progress expression also became really messy...
That's only one example. There are alot more annoyances like:
- What'll happen if I play the tween multiple time?
   in 1.4: If the tween is playing, the play action will be ignored
   in 1.5: Same as 1.4, but you can now force play it to change direction midtween
- Sometimes, changing the parameter of the tween using action needs alot of action
   in 1.4: In the worst case, you need 8 action
   in 1.5: There's a 'Parameter Set' action, you can change all 8 parameter with one action
- We can't control where the position/angle/anything will end up if we stop it in midtween
   in 1.5: You can stop it in the current position, reset it back or put it on the tween target
- What exactly is reverse action ?
   in 1.4: It is used to rewind the already played tween
   in 1.5: Play the animation in reverse
- Alot more, especially with relative and absolute introduced back in 1.4

I think it is also time to explain things like:
- The difference between all play mode
       loop: play, rewind, play, rewind, loop to infinity
       repeat: play, play, play, loop to infinity
       play once: play
       ping pong: play, reverse, play, reverse, loop to infinity
       ping pong once: play, reverse
- How relative works in tweened property (in 1.5):
       Position: Change the position force set to the initial position then tween to initial+target position.
       Size: Change the size, force set to the initial ratio, then tween to initial*target ratio.
       Size Pixel: Change the size, from initial pixel size to initial+target size.
       Opacity: Change the size, from initial opacity to initial+target opacity.
       Angle: Change the angle, from initial angle to initial+target angle.
   - How does 'current' keyword works?
       If you enter current in initial, it will use current position/angle/whatever.
       For now, setting the current in target still need some works, I haven't tested it yet.
   - Group tween is introduced in 1.5:
       You can now put several object in a tween group. To use it,
        1. Set the objects tween group on the property
            (you can set different tweens and different objects to same group, so that they played at the same time)
        2. The group progress condition is used to track the group progress.
            The group progress is the slowest progress of all the tween in the group.
            If you have two object A and B, with different duration, the one with the biggest duration is the group progress.
            note: There are no onGroupTweenEnd yet, I may or may not add it in the future.
        3. Use Group Playback actions to control it

added: group tween feature
added: force reverse, force start
added: smoothstep easing function
added: parameter set action

I still keep the 1.4 version in the download link until the 1.5 became more stable.
I am still thinking of a good way to add real tween group and queue so we only need one easetween behavior per object to tween several property at once.
Please notify me if there're any bugs...

I don't know if this is useful or not, but i think this capx could be use as a reference to test various tween mode
Tween testerlunarray2012-08-26 00:37:21
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Sun Aug 26, 2012 12:54 am

FYI: Crashes in IE (9) when using the VNDemo & tween_ref files.

Javascript error!
'console' is undefined
...lunarray_Tween_behavior.js, line 152
ImageImage
B
66
S
19
G
121
Posts: 3,195
Reputation: 72,852

Post » Sun Aug 26, 2012 12:58 am

@blackhornet, I forgot to remove all the debugging yadda yadda, should be fixed, can you try again?
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Sun Aug 26, 2012 2:15 am

All fixed! Thanks.
ImageImage
B
66
S
19
G
121
Posts: 3,195
Reputation: 72,852

Post » Sat Sep 08, 2012 3:42 am

Cant load in r102.


---------------------------
HTML5 exporter
---------------------------
Unable to load plugin in 'C:\Program Files\Construct 2\exporters\html5\plugins\lunarray.tween\': Found 'GetPluginSettings' global, but it is not a function

This plugin will not be available in the editor.
---------------------------
OK   
---------------------------
Image
B
26
S
10
G
5
Posts: 25
Reputation: 3,130

Post » Sat Sep 08, 2012 3:43 am

Oops, nevermind. Put in the wrong folder. /o\
Image
B
26
S
10
G
5
Posts: 25
Reputation: 3,130

Post » Tue Sep 11, 2012 8:14 pm

Having some issues with recent versions of C2 not picking via sprite(index).
Not sure what exactly is going on, since this worked in r95.
I can only assume that referencing the index of another object is broken now that picking for created objects has changed.

https://dl.dropbox.com/u/666516/r103easetweenpickindexiidbug.capx

@Ashley
Are the recent picking changes worth it?
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Fri Sep 14, 2012 6:32 am

@newt

Tried it on my side, I think it's either a C2 bug or a breaking change, that IID is 0 until the end of event sheet :(, I found a solution which is putting Wait 0 secs before getting up the IID. As we know it, putting Wait 0 will make subsequent action call postponed until the end of the sheet.

https://dl.dropbox.com/u/55358831/helping/r103easetweenpickindexiidbug.capx
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Fri Sep 14, 2012 1:12 pm

Yeah. That's a pretty unexpected behavior.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests