ForumsProgramming ForumIncreasing performance

2 1632
ExplosionsHurt
offline
ExplosionsHurt
251 posts
Peasant

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?

  • 2 Replies
Carlytoon
offline
Carlytoon
325 posts
Peasant

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

PixelSmash
offline
PixelSmash
569 posts
Peasant

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.

Showing 1-2 of 2