Tween engine?

  ... the case you feel the need for a new feature or want to submit one.

Tween engine?

Postby gilamran » Thu Jul 22, 2010 7:52 pm

Hi,
I come from Flash, and tweening is very important feature for any engine!
I didn't find an engine... nothing... or was I wrong?

Thanks
Gil
gilamran
 
Posts: 36
Joined: Fri Jul 16, 2010 8:56 pm

Re: Tween engine?

Postby torsk » Thu Jul 22, 2010 8:10 pm

Hi,

See ShapeModifiers and PathModifiers examples. with shapemodifiers you can do basic move/rotation/fade/scale etc tweening.
torsk
 
Posts: 25
Joined: Mon Jul 12, 2010 8:08 pm

Re: Tween engine?

Postby gilamran » Thu Jul 22, 2010 8:12 pm

without the fade function (in/out, exp. cube. bounce. etc.).
gilamran
 
Posts: 36
Joined: Fri Jul 16, 2010 8:56 pm

Re: Tween engine?

Postby Nicolas Gramlich » Thu Jul 22, 2010 8:48 pm

Hi,

I've never ever coded in Flash, so let me know what you'd like to see (with links and/or examples please :P ).

Best Rrgards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Tween engine?

Postby gilamran » Fri Jul 23, 2010 4:59 pm

http://www.greensock.com/timelinemax/
It's all about the functions that calculate the current position. there are many types of functions.
gilamran
 
Posts: 36
Joined: Fri Jul 16, 2010 8:56 pm

Re: Tween engine?

Postby Nicolas Gramlich » Fri Jul 23, 2010 5:28 pm

Except the "wave-style letters" you can already do all what is in that "Interactive Example" in AndEngine too. Such Text animations would be really nice though.

:arrow: noted on a PostIT :roll:

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Tween engine?

Postby gilamran » Fri Jul 23, 2010 5:44 pm

I'm talking about the function that you are using in your calculations...
Are you using linear interpolation? cubic? bounce? these are very important in game development.
gilamran
 
Posts: 36
Joined: Fri Jul 16, 2010 8:56 pm

Re: Tween engine?

Postby Nicolas Gramlich » Fri Jul 23, 2010 6:14 pm

Currently it's all linear interpolation.
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Tween engine?

Postby gilamran » Fri Jul 23, 2010 9:47 pm

very easy to implement all the other functions...
I have them all in AS3, and I can translate them into Java quite fast...

what do you say?
Attachments
EaseVisualizer.rar
drop it into your browser...
(62.75 KiB) Downloaded 212 times
gilamran
 
Posts: 36
Joined: Fri Jul 16, 2010 8:56 pm

Re: Tween engine?

Postby Nicolas Gramlich » Fri Jul 23, 2010 10:41 pm

Yeah think that could be done.

The Linear interpolation basically happens here:
http://code.google.com/p/andengine/sour ... er.java#58
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. @Override
  2. protected void onManagedUpdateShape(final float pSecondsElapsed, final IShape pShape) {
  3.     this.onSetValue(pShape, this.mFromValue + this.getTotalSecondsElapsed() * this.mValuePerSecond);
  4. }
Parsed in 0.012 seconds, using GeSHi 1.0.8.4


Maybe a IInterpolator-Interface could be created or so with a default LinearInterpolator implementation. :)

Do you want to give this a try :?:

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Next

Return to Features

Who is online

Users browsing this forum: No registered users and 4 guests