Hello Guest

Author Topic: iOS 6 and Xcode 4.5 performance problems?  (Read 19546 times)

vambier

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: iOS 6 and Xcode 4.5 performance problems?
« Reply #15 on: October 12, 2012, 07:47:01 am »
I just tried to run my scene on an ipad 1 and got 27fps!! And I just started building my scene, so it's not even finished yet.
So I think I cheered to soon... But the whole game is slow, my animations run at 24 fps, so I would think that 27 fps would still be enough for a fluid animation.
But my player moves really slow too, unplayable actually.
Anyone got other ideas about this? Is going back to an older xcode an option? If so, will I still be able to build for ios6?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: iOS 6 and Xcode 4.5 performance problems?
« Reply #16 on: October 12, 2012, 09:06:55 am »
You need to identify the actual issue first. Profile the game first.

Having said that the iPad1 is massively fillrate bound - this is likely to be the issue. Do you have lots of overlapping sprites?

vambier

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: iOS 6 and Xcode 4.5 performance problems?
« Reply #17 on: October 12, 2012, 01:08:09 pm »
I do have a couple of overlapping sprites, but I don't think that's the problem.
Before I started using unity a couple of weeks ago I was making a game using the iTorque engine of GarageGames.
They decided to no longer support that engine and it didn't run correctly on the ipad 3, iphone 4 and ios 6 so that's the reason I switched to unity(and I'm really glad that I did!!!) in combination with your 2D toolkit, which is also awesome!!
But the thing is, the game was 2/3 finished, but now I'm rebuilding the game in unity, so the scene I'm testing now I already build once in that engine, and it ran really smooth on the ipad 1, ipad 2, ipod 2nd gen and iphone 4. Since I'm using all the same resources that I used in the other engine I'm certain that the problem is not with the ipad 1. On the ipad 2 I get a higher framerate now, but it's still only 60fps and I think it could do better.
But profiling could be usefull, I will look into that.

fsadeq said it had something to do with upgrading to xcode 4.5 and that it worked fine before that. Any thoughts?
I read the thread of the unity forum that fsadeq posted but couldn't find an answer there.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: iOS 6 and Xcode 4.5 performance problems?
« Reply #18 on: October 12, 2012, 01:32:30 pm »
Its not going to go any faster than 60fps - its vsynced and thats how fast the display refreshes

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: iOS 6 and Xcode 4.5 performance problems?
« Reply #19 on: October 12, 2012, 08:19:12 pm »
I do have a couple of overlapping sprites, but I don't think that's the problem.
Before I started using unity a couple of weeks ago I was making a game using the iTorque engine of GarageGames.
They decided to no longer support that engine and it didn't run correctly on the ipad 3, iphone 4 and ios 6 so that's the reason I switched to unity(and I'm really glad that I did!!!) in combination with your 2D toolkit, which is also awesome!!
But the thing is, the game was 2/3 finished, but now I'm rebuilding the game in unity, so the scene I'm testing now I already build once in that engine, and it ran really smooth on the ipad 1, ipad 2, ipod 2nd gen and iphone 4. Since I'm using all the same resources that I used in the other engine I'm certain that the problem is not with the ipad 1. On the ipad 2 I get a higher framerate now, but it's still only 60fps and I think it could do better.
But profiling could be usefull, I will look into that.

fsadeq said it had something to do with upgrading to xcode 4.5 and that it worked fine before that. Any thoughts?
I read the thread of the unity forum that fsadeq posted but couldn't find an answer there.

I'm pretty sure the issue I'm describing is different from what you are experiencing. Mine specifically drops in performance when building from Unity 4 (haven't tried 3.5) and then using Xcode 4.5 to deploy. Performance goes back to normal when deploying with Xcode 4.4. The Unity folks were able to replicate with the Xcode project I sent them and said they think the issue has been fixed in the newest Unity 4 beta (yet to be released, but soon they said).

Have you enabled the internal profiler to see exactly what is taking up so much time? 

vambier

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: iOS 6 and Xcode 4.5 performance problems?
« Reply #20 on: October 14, 2012, 07:52:59 pm »
Yes I have tried the profiler, nothing strange there...
But I have found the problem, after a lot of digging I thought I'd try different settings for Edit->Project Settings->Time->Fixed_Timestep. I set it to 0.01 instead of the default 0.02. I do an AddForce to my object in the FixedUpdate() function, but I could see it was not the framerate. This fixed it!
But this wasn't the only problem, I also disabled the Anisotropic Textures and Anti aliasing in the QualitySettings, this was wat was causing the lower framerates on the ipad 1 for me...

Thanks for the help!

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: iOS 6 and Xcode 4.5 performance problems?
« Reply #21 on: October 15, 2012, 08:13:12 pm »
For anyone curious, it appears the latest beta of Unity 4 (b11) resolves these issues I was describing.