1
votes

I am writing a game in SceneKit, and it is divided into levels. Each level uses different basic shapes (the ones that come in Xcode/SceneKit as default, found in the object library) as "obstacles" that the player must avoid. So level one has blocks as obstacles and runs at 60 FPS on iPhone 6 and a below, yet when the player plays level two, which uses Pyramids as obstacles, the FPS drops to 10. There are less than 500 nodes in each level. It runs at 60 FPS on iPhone 8. What is occurring and how can it be fixed?

Here is a youtube link that displays how they are being used in the game. It is run on an iPhone 8 Plus and has no FPS issues; however, if run on an iPhone 5s or lower the frame-rate drops very low for the first level, but not the second.

This link provides it with statistics running. WaitDrawable takes up a big portion.

Here are images of the wireframes, with and without materials.

Box Wireframe without MaterialBox Wireframe With MaterialPyramid Wireframe with MaterialPyramid Wireframe without Material

1
Images, PLEASE!!! There is no way to even begin understanding the problems of your pyramids and benefits of your blocks without analysing their respective wireframes. Please take screenshots of the models without materials, and with materials. Both the cubes and the pyramids in isolation, and in their formations.Confused
@Confused I updated the question. Also, for clarification. these are the objects found in the "Object Library", with no external mesh added except the color of the node.Will Boland
Use Instruments! It will tell you what's slowing down the rendering.matt
@matt animations took 10ms.Will Boland
@matt It appears that on the first level WaitDrawable takes up 50% of the graph, while on level two it is 1%.Will Boland

1 Answers

0
votes

The issue was that Physics was being called on every frame, then performing some logic. The player was hitting the floor, used to center the block, every frame. I changed the contact bit mask and all the issues went away.