Forums

ForumsProgramming Forum

Increasing performance

Posted Sep 9, '11 at 5:31pm

ExplosionsHurt

ExplosionsHurt

247 posts

Right now the avatar of my game is a spinning square. The square spins using tweening in the square's timeline.

Does it give better performance doing that or increasing the squares's rotation property every frame?

 

Posted Sep 9, '11 at 10:36pm

Carlytoon

Carlytoon

329 posts

I think rotation give better performance because flash manage only one image and with time line rotation flash manages more images.

 

Posted Sep 10, '11 at 3:31pm

PixelSmash

PixelSmash

567 posts

Actually Carly, I don't know about that - since it's only a vector image, not multiple images. Under the hood, wether you use it via timeline tween or via code, the result is the practically the same - you just use a different approach.

Besides, for a simple rotation, there's nothing you have to worry about with performance. Only if you're using multiple or very large bitmaps you could potentially see a performance difference.

 
Reply to Increasing performance

You must be logged in to post a reply!