Jump to content

To tween or not to tween


spandy
 Share

Recommended Posts

Hi,

 

I have used tweening on some destructible enemy sprites in a test game. These sprites simply moved from one side of the screen to the other without variation, so it seemed convenient to use the TweenManager and Tween to do it. I guess the other option would be to code it myself in the update loop.

 

As things got a little more sophisticated, I found myself stopping the tweens and restarting them, which in my case meant creating a new one to recalculate positioning and speed. This somewhat reduced the convenience of using the built in tweening.

 

Is there some kind of general consensus or advice on when it's ideal to use tweening versus positioning sprites yourself in the update loop? My thoughts at the moment are that 'll be using the built in tweening for non-interactive animations only.

Link to comment
Share on other sites

I use tweening mostly when creating the GUI. It's a excellent way to animate the buttons to appear and disappear.

And also when doing some trivial ( as you have sad:  for non-interactive animations only) animations.

Lets say for an example that a pulsating start in the background is a perfect candidate for tweening , or maybe a moving platform.

Yes , the user will interact with the platform , but it will have no influence on it.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...