At some point during its development, every game will have performance issues, and every game will crash. Fortunately, iOS has some of the best tools around for squeezing as much performance as possible out of your games and finding bugs and other issues.
In this chapter, you’ll learn about how to use these tools, how to fix problems, and how to get information about how your game’s behaving.
You need to coax a better frame rate out of your game so that it plays smoothly.
To improve your frame rate, you first need to determine where the majority of the work is being done. In Xcode:
From the Scheme menu, select your device, so that the application will be installed to the device when you build.
Open the Product menu and choose Profile (or press Command-I).
The application will build and install onto the device, and Instruments will open and show the template picker (see Figure 11-1).
Select the Time Profiler instrument, and click Choose. You’ll see the main Instruments interface (Figure 11-2). Click the Run button, and the app will launch, and you’ll start seeing information about how much CPU time your game is taking up.
Click the Call Tree button at the bottom of the screen, and turn on Invert Call Tree, Hide Missing Symbols, and Hide System Libraries, and turn off everything else in the list, as shown in Figure 11-3.
Take note of the name of the functions that are at the top of ...