Jump to content
Search Community

Greensock tweening on IOS

loll test
Moderator Tag

Recommended Posts

Hi,

 

I am building an app on IOS and attempting to use greensock for transitions.

 

The problem is that while the tweening works nicely on the computer, when it is packaged and put on the iPAd , the transitions are slow and jerky. is this just the way it is, or is there something i might be missing that makes it slow and jerky?

Link to comment
Share on other sites

Your desktop computer is probably 10x faster than the iPad (or more). TweenLite and TweenMax are highly optimized, but if you're moving a lot of pixels around, the reality is that the iPad is gonna take a while to do the processing. And typically the tweening engine only accounts for a VERY small portion of the CPU load (likely less than 5%) - graphics rendering is usually much more demanding. Of course you can do lots of things to optimize your app, but that topic could take hours to cover. If you're moving large images/assets around on the screen, you might want to look into using BlitMask to leverage blitting techniques:

Link to comment
Share on other sites

Thanks for your advise.

 

I have not heard of the blitmask before.

 

this is the code that is running slow: TweenMax.to(latestSc,1.5,{x:500,y:372,scaleX:60,scaleY:60,alpha:0});

 

Basically its a text field that enlarges and fades at the same time, its only usually 2 numbers in the text field, so its not a field that is very full of text, would something like that benefit from blitmask?

 

I suspect its the alpha change that it is struggling on.

Link to comment
Share on other sites

Have you tried various tweens with and without certain aspects being animated, to find out what's sowing it down? When I get my iOS license again (forgot to renew) I'll be testing this myself. On Android I discovered bitmaps were much slower than vectors, no matter if you targeted CPU or GPU. Scaling and movement were fine, but alpha caused the various devices I had for testing to slow down. I'd like to see how my stuff runs on iOS.

 

It's interesting Jack that you say to use bitmaps instead of vectors. I've been ignoring Illustrator and Photoshop in favour of Flash's drawing API, this seems to improve performance hugely. Is this different to vectors made in Illustrator?

 

This is an interesting discussion :)

Link to comment
Share on other sites

Hey MrEmpty,

 

Thanks for chiming in.

 

optimizing Flash performance on mobile devices appears to be a bit of a fine and mystical art these days.

 

here are some good resources:

 

http://blog.starnut.com/flash-to-ios-performance-tests/

 

http://www.adobe.com/devnet/flash/artic ... -tips.html

 

http://blog.kwazi.co.il/mobile-app-deve ... %E2%80%9D/

 

 

I find it interesting and encouraging that you have had good luck with vectors. What Jack said about bitmaps though is a good rule of thumb for most cases. As he said this is a discussion that could take a few hours and there are caveats to everything.

 

loll, scaling vector text to a value of 60 and changing its alpha is probably one of the more processor intensive tasks that you could ask of the Flash Player. I would suggest that you consider an alternate effect. I really don't know if there is a good way to make that easier. There is really nothing that TweenLite can do to make that run better than it is :(

 

The consensus on Flash mobile development seems to be that it can work great, but you have to be willing to make compromises.

Link to comment
Share on other sites

Hey Carl.

 

Those are good links, I'll no doubt find myself reading a lot about this.

 

When I did my testing (my current job is to help a large well known non-profit create digital labels using iPad style devices) I got to test almost every tablet currently on sale. The difference between Android and iOS was huge, it made me think Android must be leaked beta software. ;) But yes, the vectors ran really smoothly. On the Galaxy 10.1 tab for example, running at full 1280x800 I used my recent parallax thing to tween a load of interactive and non-interactive content, across 5 layers, and I got a solid 60fps. When I started adding images, It dropped to round 50-ish then gradually down to a crawl. Replacing the PNG bitmaps with movie clips filled with brownian motion circles wobbling themselves around, it was back at 60fps. So what I saying is on Android at least, sticking to the drawing API kept things massively fast.

 

That may be Android though, it seems to have very poor memory management. And it meant I got good at drawing in code which is something I needed to learn :)

 

With regards to the original poster, can you not use bitmaps instead of vector text? Try creating a Glyph Sheet (Sprite Map for characters), I'm sure you'll find something on Google.

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