0

I created a game that uses SceneKits Pyhsics engine. Total number of vertices 4300. The game runs fine on iPhone5s, but gets slow on older devices such as ipad3. I ran the diagnostics with OpenGL ES Analysis. These are the screenshots of 15 seconds in game time. enter image description here

And the other part of data: enter image description here

enter image description here

enter image description here

There seems to be many,many redundant calls involved. When I digged deeper I just found some elvish I don't understand. I searched documentation and watched WWDC video in 2014 on this topic but they only talk about the classic shadowPath property. What can I do about this?

potato
  • 4,479
  • 7
  • 42
  • 99
  • The first thing you need to do is establish whether you are CPU or GPU bound. The screenshot showing 74% renderer utiliziation - is that from the slow iPad3 build or the fast 5S build? If it's from the latter then you're probably GPU fill rate bound. No amount of CPU optimization will help. You need to reduce the number of overlapping polygons, simplify your pixel shaders, use compressed textures or render to a reduced sized render target. iPad3 is an extremely tricky device, because it has 4x the pixels of the iPad2, but a GPU that is only about 2x faster – Columbo Oct 13 '15 at 20:47
  • Yes, it is from iPhone 5s. About the number of overlapping polygons-It is only a cube rolling on the floor so that I guess won't help. About shaders, how do you do that in SceneKit? I am only using geometry and with some materials to which I applied textures. Do compressed textures mean just smaller images? What does it mean to render to a reduced sized target? Sorry for so much questions, but I started 3D programming with SceneKit, and as you can tell there aren't many resources out there. – potato Oct 14 '15 at 07:33
  • Unfortunately, I'm not familiar with scenekit so can't answer all your questions. I assumed it was a 2D API, but now I see it's 3D, perhaps you might get some traction from reducing transparent objects, and simplifying the lighting (reduce the number of lights). For reducing the render target size, I'm using glkit, and there's a contentScaleFactor property which can be adjusted. On a retina device like iPad3 it defaults to 2.0, I believe. Adjusting it to 1.0 will make it render at 1024x768 instead of 2048x1536. Unfortunately I don't know if SceneKit exposes a similar option. – Columbo Oct 14 '15 at 08:11

0 Answers0