Skip to main content
Inspiring
October 17, 2011
Question

understanding whats happening when slow on first run [iOS - gpu mode]

  • October 17, 2011
  • 2 replies
  • 2168 views

Hello,

I am trying to understand what is happening when my app first runs on iOS, its a little choppy... but will smooth out nice after a minute or so. It will then stay smooth.

On android, I add all my objects to stage behind a black rectangle sprite for 6 seconds while the game states "loading".

This is enough time to smooth out any first time stutters as it ups to the gpu I assume.

I do this on iOS too.

The behavior is not really the same though.

On android it takes a moment, and its over with (i hide it behind a sprite).

On iOS its almost like a prolonged slightly inconsistant framerate for a minute untill the game gradually smooths out and runs well from then on.

Any insight would be much appriciated.

Thanks,

running in GPU mode

mostly bitmaps

nothing cacheAsBitmap

testing on iPod4

30 FPS - ENTER_FRAME event for the main loop.

...its not anything new to Air3, i had noticed it in earlier builds. I would like to know the proper way to "pre cache" on iOS or smoothout the gameplay before letting the user play.

This topic has been closed for replies.

2 replies

boat5Author
Inspiring
October 17, 2011

Yes i have found textFields to be demanding, but the same use has no problem on android. So far, the iPod4 has been very stable, perhaps more so than my android device,  except for this.

I have not yet tried stageText. I probobly will later on when i get a chance.

Now that i look at it.. overall i have up to 4 textFields on stage depending on scenerio, perhaps thats just to much at this time.

boat5Author
Inspiring
December 24, 2011

Well its been a while, but its running smooth now.

I think i had another active embeded font on screen before. Now that its all using device fonts it seems ok.  thanks mark.

Also, i just tried another android device (htc evo 4g) which i find to be low on the Air GPU test results, that device also suffers from lag on text, my other android devices do not. overall, unfortuitely text fields are just demanding in general i think. thanks colin

boat5Author
Inspiring
December 24, 2011

fyi, months ago i did try stagetext, at that time my speed test comparisons showed that it was slower, so i did not even attempt to apply it to my current game.

test was 10 txt fields on stage updating with and ENTER_FRAME event.

1 app stagetext, another app with normal text.

boat5Author
Inspiring
October 17, 2011

well i think its fonts causing it unfortunately. It sometimes seems intermittent, but so far with text removed its running 100% now.

Does anyone have any tips about font lag? In my situation, i cant draw to bitmap because the font changes to much.. for example one area ENTER_FRAME event has a textField with a number incrementing on screen.

The only thing i can think of is to rework my logic so my  always present textField scenario is not in the game... but that not ideal, it runs great on android.

what about stageText? I know its for input, but will it gain performance if i use it as a dynamic textField? (assuming thats even possible)

October 17, 2011

Are you using custom fonts? What happens when you use _sans or some other default system font?

boat5Author
Inspiring
October 17, 2011

Yes i am using an embeded custom font.

I am using Flash CS5.5, this textField is nested inside a MovieClip.

It does not seem any better if i select 'use device fonts'

If i select Bitmap Text [no anti-alias] It seems to perform the best, but doesnt look as good

its not as good performance as no text. But its better.


Edited for typos