xcode iOS 模拟器游戏运行速度非常慢(低 fps)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19556867/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS Simulator games run very slow (low fps)
提问by LearnCocos2D
Diving into sprite kit (xcode 5). There are two example programs I'm working with, 1. the default spaceship example that's included when creating a new project and 2. the Adventure Game, which I downloaded.
深入了解精灵套件(xcode 5)。我正在使用两个示例程序,1. 创建新项目时包含的默认宇宙飞船示例和 2. 我下载的 Adventure Game。
Running these examples within the iOS Simulator (doesn't seem to matter which). The frame rate for each is absolutely abysmal. If I add only 30 spinning space ships in the space ship / hello world example, the FR rapidly drops from 60 FPS to (ug) 12 FPS.
在 iOS 模拟器中运行这些示例(似乎与哪个无关)。每个人的帧率都非常糟糕。如果我在太空船/你好世界示例中只添加 30 艘旋转太空船,FR 会从 60 FPS 迅速下降到 (ug) 12 FPS。
The Adventure Game example, again, running in iOS Sim, runs at a screaming 10-20 FPS (depending on how much action is going on).
冒险游戏示例再次在 iOS Sim 中运行,以惊人的 10-20 FPS 运行(取决于正在进行的动作数量)。
Is Apple serious with these game examples? Sprite Kit seems to be crap -- I assume the problem is either the way the programmers employed Texture Atlas' or it's the way Sprite Kit (API) is dealing with them.
苹果对这些游戏示例是认真的吗?Sprite Kit 似乎很垃圾——我认为问题要么是程序员使用 Texture Atlas 的方式,要么是 Sprite Kit (API) 处理它们的方式。
Someone help me understand this or fix it?
有人帮我理解这个或修复它?
Running xcode 5 under Mavericks, Mac Mini -- I program in Unity3D and have no problems w/ FR there, esp w/ only 30 objects using 2DToolkit.
在 Mavericks、Mac Mini 下运行 xcode 5——我在 Unity3D 中编程并且在那里没有 FR 问题,尤其是使用 2DToolkit 时只有 30 个对象。
回答by LearnCocos2D
The Simulator is not a device. The Simulator uses the Mac's CPU (tons faster) and the Mac's memory (lots more). However the Simulator also emulates OpenGL ES via a software renderer, which is abysmally slow even on the fastest CPU.
模拟器不是设备。模拟器使用 Mac 的 CPU(更快)和 Mac 的内存(更多)。然而,模拟器还通过软件渲染器模拟 OpenGL ES ,即使在最快的 CPU 上也非常慢。
Because of this and the fact that no end user will ever run an app on the Simulator, any performance measurements on the Simulator are utterly IRRELEVANT!
由于这一点以及没有最终用户会在模拟器上运行应用程序的事实,模拟器上的任何性能测量都完全无关紧要!
Sorry for shouting but I felt this needed to be said with conviction. ;)
抱歉我大喊大叫,但我觉得这需要坚定地说。;)