简体   繁体   中英

iPad Pro simulator + cocos extremely slow on Macbook Air 4 GB RAM

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 (eg 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?)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM