Jump to content
GreenSock

yaure

Timelinelite vs Nested Movieclips performance [SOLVED]

Recommended Posts

Hi everyone

 

I'm making a game with lots of character animations and I'm wondering whether there will be any differnce in using Timeline Max or lots of Nested Movieclips

 

I'm using Flash IDE and the animation I'm making have the main character walking in 12 directions, each walking cycle have 5 bitmaps, I put them into frames in symbols (I don't want to make some animation classes or load bitmap classes)

The character also picks up many different kinds of weapons, with differnt movieclips showing the walking with different weapons in 12 directions, plus animation for shooting, get hit, effects etc...

 

I've never made a game with so much animation before, I may be doing this in a very inefficient way

 

What I do is to have a character container, and then different MC symbols for different weapons. Inside the the weapon symbols on the timeline there are lots of different layers, each of them represent animation(movieclips) of the 12direction, shooting, get hit, effects. I use stop() and invisble = false to hide the layers and tweenmax with frame plugin to control the frame animation times and character movement.

 

I'm wondering whether timelinelite/max will be useful here instead of nested movieclips.

The enemies will most likely be using the same method for animating.will there be any noticeable differences? or is there a better way for doing the character animations?

 

jus another quick question, I want to get rid of enterframe and use tweenlite for looping(collision detection etc), are all tweenlite/max loops synchronised? e.g. will a 0.03delay loop on the player mc be the same as the enemie mc. Should I just use one main tweenliteloop? had some bad experiences with multiple enterframes before and I heard timers are bad

 

Many Thanks

Yaure

Link to comment
Share on other sites

First of all, yes, all TweenLite and TweenMax tweens are completely synchronized (many other tweening engines are not).

 

If I were you, I'd run some tests to see if the MovieClip animations perform better than TimelineLite ones in your particular scenario - I couldn't say for sure which one would be faster. TimelineLite, of course, is highly optimized and extremely efficient but I'm not sure if it outperforms MovieClip frame-based animations. Frankly, I doubt the difference is much either way because the vast majority of the CPU load in virtually any game/application is graphics rendering (by a WIDE margin). However, if you want to be able to alter the speed of your timeline (make it go in slow-motion or super fast) dynamically, you should definitely use TimelineLite. A MovieClip timeline has a fixed resolution (number of frames) whereas TimelineLite can interpolate pretty much infinitely. For example, let's say your swf is built to run at 30fps and you have a 1-second animation in place (30 frames). If you slow it down to 0.25 speed, it would essentially play at 7.5 frames per second, leading to jerky motion even though the CPU isn't necessarily bogging down at all. TimelineLite, on the other hand, can play perfectly smoothly at 30fps even when the timeScale is reduced to 0.25. It figures out the inbetween states (interpolates) on the fly very quickly, so it's almost like it's drawing in extra frames where they're needed.

 

Hope that helps. Good luck with your game!

Link to comment
Share on other sites

Thanks a lot!

great to know tweens are synchronised

I'm definately using timelinelite after seeing what u wrote

controlling speed of animations :D

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.
×