Game Development Reference
In-Depth Information
Figure 14-12 . The game runs with profiling labels enabled
From top to bottom, these numbers are:
Draw Calls (here: 12): A draw call basically occurs every time OpenGL
needs to draw from a different texture, but there are other reasons too. Each
draw call incurs a penalty, so the goal is to have as few as possible. The way
to achieve that is by using Sprite Sheets to combine multiple images in the
same texture, and to use as few Sprite Sheets as possible. The draw call of 12
in this example is reasonably low. You will most likely see performance de-
gradation if the number of draw calls is close to or even above 100.
Seconds per Frame (here: 0.057): This refers to the average time it took to
complete the update cycle for a frame, which includes processing game lo-
gic, physics, and rendering. To achieve 60 frames per second (fps), the
seconds per frame must be 0.0166 or less. You have twice as long if your
framerate target is 30 fps. The main use of the seconds-per-frame counter is
to see how much room you have to add more game logic before the framer-
ate drops again.
Frames per second (here: 15.0): That's the framerate, and before you won-
der: it's only 15 frames per second because the screenshot was taken in the
iOS Simulator. The Simulator uses a software renderer that is quite slow.
The game runs with 60 fps on most devices. Also, note that this value is an
average of the most recent frames, so a value of 45 actually means that half
of the frames were rendered within 0.0166 seconds (60 fps) and the other
half took more than that (30 fps).
Search WWH ::




Custom Search