Jump to content
Search Community

Seconds vs frames for tween duration

Sundance test
Moderator Tag

Recommended Posts

I have a project where most of the tweens last exactly 0.15 seconds. It may seem like an odd number, but it's what feels most pleasing to the eye for this project.

 

My question is: is it more efficient to specify the tween duration in frames or in seconds? I assumed frames would be the most efficient, so I converted my code to be all frame based. I set the project at 27fps and have the animations set at 4 frames, which isn't exactly 0.15 seconds, but is pretty close.

 

But I would like things to look just a hair smoother. To get up to the next number that divides evenly by 0.15, I would need to up the framerate to 40, which gives us an even 6 frames per animation. This makes me worry that the frame rate may be too high for less powerful computers, though.

 

I could avoid all of this by simply using seconds instead of frames, which brings me back to the original question.

 

tl;dr: Is it more efficient to specify the tween duration in frames or in seconds?

Link to comment
Share on other sites

Neither is more "efficient" - they're both equal processing-wise, but if you define your animation in frames instead of seconds and your swf's frame rate drops (for whatever reason - maybe the user's computer is doing some activity in the background or there's a huge spike in graphics rendering activities), the animations will take longer to complete because they must honor exactly the number of frames you specified. Most animators prefer that timing is preserved, not the number of frames. 

 

Honestly I'd probably choose either 30fps or 60fps because issues with vsync in monitors can make anything between those two values seem a little odd. In other words, 40fps doesn't really look much better than 30fps. In fact, it can look slightly worse at times because of the lack of synchronization with normal monitor refresh cycles. 

 

If you want things to look really smooth, I'd recommend shooting for 60fps. 

 

And again, unless you have a specific reason that you must use frames-based timing, I'd stick with the default time-based mode. 

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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