Skip to main content
Known Participant
November 1, 2011
Question

Low FPS and Debugging Mode on the iPhone 4

  • November 1, 2011
  • 2 replies
  • 3799 views

I have created an app... it worked perfect on my iPhone 4 but when i added animation  i noticed a BIG PROBLEM.

I have 3 screens and the scheme is simple.   

    

                    FRAME3

FRAME1 ----

                    FRAME2

Then i added 2 frames wich contain the animations

                    FRAME4 ---- FRAME3

FRAME1 ----

                    FRAME5 ---- FRAME2

The animation it's a simple TweenLite animation... a JPEG image (quality 80) contains the image of FRAME1 and FRAME2 (1920x640) and TweenLite moves it to the left so from the Frame1 image i can pass to the FRAME2 image and then load FRAME2

I think it's not a complicate animation... but on my iPhone it goes very slow... 8 fps eye-looking...

I tried to add image.cacheAsBitmap = true, stage.quality = StageQuality.LOW; , i reduced the JPEG quality to 50 and i set framerate to 100, 30, 60, 24 and 15 but nothing worked...

I searched for a solution but i haven't figured anything...

Oh, i converted images to Buttons so i added an Istance to them

I wanna also try to activate Debugging mode via Wi-Fi... i set in Publishing Setting "Rapid Publishing for Mobile Debugging", installed my app and Started a Remote Debugging Session (AS3)... then i opened my app but the PC doesn't find the iPhone...

This topic has been closed for replies.

2 replies

Participating Frequently
November 2, 2011

In regards to the debug session not working - it is probably a firewall issue. Try turning off your windows firewall before starting the debug session. You should also be aware that the app will run much slower in debug mode, particuarly if you have a lot of trace statements. It'd probably be best if you comment out all unnecessary trace statements before trying to run a debug build.

Known Participant
November 4, 2011

I eliminated every trace output... Converted my PNGs into 100-quality Jpegs and Now i am on 12-16 fps... Anything about blitmasks?

Inspiring
November 4, 2011

are you using timeline animations?

Inspiring
November 1, 2011

Hi,

It sounds like you're using timeline animations. When developing for mobile you really need to think different then when you develop for desktop.

Building apps and games for mobile, also with the smallest animations that you'd usually think should work ok even on mobile requires taking advantage of different optimization techniques. Stuff like using bitmap sheets for animations, using cacheAsBitmap and cacheAsBitmapMatrix for complex display objects that use 2d transitions like rotating and scaling, and in most cases using the GPU rendering mode rather than the CPU.

If you're only starting to develop for mobile you should start and read about all this. a good place to start with is reading this PDF - it explains many of the techniques available for optimizing your app and it helped me alot, I refer to it from time to time even today. People wrote so much about this and you can just google

it and find many articles and tutorials about it.