0

iPad Pro simulators are so slow that they become practically useless when running my cocos2dx game. Theoretical FPS displayed is 60, but all animations take minutes instead of seconds (e.g. 30 seconds instead of a fraction of a second).

I made sure 100 times that Slow Animations are turned off on my simulator.

I've found this topic: iOS Simulator games run very slow (low fps) where the reasons for possible poor simulator performance are explained, but:

  • First, I can't deduce HOW slow their simulators are (they complain about bad FPS, my theoretical fps is good (???)). I'm getting the impression that they are able to test something while I am not
  • Second, I need a solution to this problem as I need to test my stuff on an ipad pro 12.9 inch and I don't have the funds to buy one for tests now :) . However, I am thinking on getting a better macbook.

I am using Macbook Air 2014 with 4GB RAM. Do you think this might be the reason? Can anyone tell me whether they are using ipad pro simulators when testing their games (Cocos, Unity, SpriteKit?), and if you get decent speed, then what are your Mac specs that might affect performance (processor, RAM?)

Community
  • 1
  • 1
Kasia K.
  • 151
  • 1
  • 9

1 Answers1

1

The simulator is not a device and it's performance varies depending on the machine you're running it on, but also the type of device you're simulating.

The iPad Pro devices are both large and have a retina display. The simulator has to process 2732 x 2048 (12.9" 5.6M pixels) and 2048 x 1536 (9.7" 3M pixels). The iPhone 6/6plus and later models have similarly high pixel counts. This takes a lot of CPU+GPU power to render all those pixels.

Your Macbook Air is decent, but it's screen has a much smaller resolution than the simulator and its GPU was chosen with its smaller screen-size in mind. The integrated intel graphics aren't that performant.

If you can test out running the same game/app as a Mac application instead you should see better performance.

My advice:

  • Use 30fps during daily testing (or when in debug mode) director->setAnimationInterval(1.f/30.f);, if your game requires 60fps for its gameplay then you may want to look into other options.
  • You can also add one of the non-retina iPad simulators for testing. iPad Mini or iPad 2. Test on the Pro simulators periodically only to check for any positioning/scaling issues.
  • Render to a small(er) frame buffer and then render the frame buffer scaled up into the final screen buffer.

It is always recommended to get an actual device when doing mobile development as the simulators/emulators don't provide real world performance characteristics.

Even though it's not what you're asking I'd still repeat the key point in the linked answer: Only worry about performance when running on an actual device, and find a way to not have it affect.

Steve T
  • 7,729
  • 6
  • 45
  • 65
  • Thank you very much for your explanations and advice. I'll try your hints out soon and let know if I managed to get any satisfactory results. I'm testing the game mainly on my iPad Mini 4, but as you say, I need to test the layout on 12.9 iPad Pro, and for that I sometimes need to see the end of animations on the simulator - and I have to wait for half an hour or so for an action sequence to complete. Or I need to collect some touch coordinates from the DrawNode and the poor sampling makes it impossible to get smooth lines. – Kasia K. Dec 28 '16 at 12:27
  • I have checked quickly the fps in cocos and it turns out that it doesn't work on ipad pro simulator. It does work on my ipad mini and ipad air 2 simulator, but the fps on the ipad pro 12.9 stays on 60. – Kasia K. Dec 28 '16 at 14:01
  • I'll try testing it out. – Steve T Dec 28 '16 at 17:48
  • iPad Pro: 10-15fps, iPhone SE: 20-30fps, how did you setup the project that you're testing with? Maybe you disabled the fps update somehow? – Steve T Dec 29 '16 at 02:15
  • iPad 2 (iOS 9.3, doesn't support iOS 10) - which I had to install separately in the Xcode prefs - gets similar results to the iPhone SE: 20-25 fps. I'm testing on MBP 2015, so a reasonably heft machine (for a Mac). – Steve T Dec 29 '16 at 05:28
  • I can't recall doing any particular magic with the project configuration... although I am using JavaScript as the development language (I was hoping to make a web app someday, too), so I suppose there *might* be a problem in the JS version. I can't understand though, why changing the fps works on my ipad mini and not on the ipad pro simulator. – Kasia K. Dec 30 '16 at 00:02
  • Definitely bizarre, I'll probably create a javascript helloworld as well and also run the js tests project. – Steve T Dec 30 '16 at 08:39