Game Development Reference
In-Depth Information
positions to the GPU so it can render a large number of sprites from that texture all by
itself.
To summarize: sprite batching speeds up drawing identical sprites using the same tex-
ture and is most effective when using a texture atlas created with TexturePacker. The
more sprites you display onscreen, and the bigger the sprites are (and particularly if
they're rotated and scaled too), the greater the benefit of using sprite batching.
The lessons you'll learn in this chapter will become the foundation for the parallax-
scrolling shoot-'em-up game in Chapters 7 and 8 .
Retina Display
The newer iPhone models starting with iPhone 4 use a high-resolution display called
the Retina display. It has a resolution of 960×640 pixels, which doubles the number of
pixels in each direction (previous-generation devices were 480×320 pixels). The 3rd-
generation iPad also has a Retina display, doubling the resolution of previous iPads
from 1024×768 pixels to 2048×1536 pixels.
To make this distinction, the Retina display graphics are commonly called high-defini-
tion (HD) graphics, whereas non-Retina graphics are standard-definition (SD) graphics.
HD is not limited to image files. Cocos2d also supports HD resolution versions of
particle effects, bitmap fonts, and tilemaps. For each of those, you should create the
HD version first and then downscale the asset for SD resolution.
Table 6-1 sketches a brief overview of the technical specifications of iOS devices. If
you recall from Chapter 2 , cocos2d 2.0 doesn't support 1st- and 2nd-generation
devices, but they're in the table for comparison. One thing to keep in mind: the maxim-
um texture size for iPad 2 has been increased to 4096×4096 but only if the device is
running iOS 5.1 or newer.
Table 6-1 . The Technical Specifications of iOS Devices
 
 
Search Nedrilad ::




Custom Search