Game Development Reference
In-Depth Information
Summary
2D graphics have been around since the very inception of the video game industry,
and this chapter discussed many of these core techniques. Although these tech-
niques were developed with the limitations of CRT monitors in mind, most of
them have carried over to modern games. Even today, we use double buffering in
order toprevent screen tearing. Andeven thoughthe resolutions ofsprites have in-
creased dramatically over the years, they are still the primary visual building block
of any 2D games, whether animated or not. Finally, our discussion of scrolling and
tile maps should have given you insight into how these slightly more complex sys-
tems might be implemented in a modern 2D game.
Review Questions
1 . How does an electron gun draw the scene on a CRT? What is VBLANK?
2 . What is screen tearing, and how can it be avoided?
3 . What are the advantages of using double buffering instead of a single-col-
or buffer?
4 . What is the painter's algorithm?
5 . What advantage do sprite sheets have over individual sprites?
6 . When should the camera's position update in single-direction scrolling?
7 . If all background segments can't fit into memory at once in bidirectional
scrolling, what data structure should you use to track the segments?
8 . What is the difference between a tile map and tile set?
9 . For animated sprites, why is it preferable to have the animation FPS as a
member variable?
10 . How does an isometric view differ from a top-down view?
Additional References
Cocos2d
The most popular 2D library used for iOS games is cocos2d, which is available at
www.cocos2d-iphone.org .
Itterheim, Stephen. Learn Cocos2d 2: Game Development for iOS . New York:
Apress, 2012. There are many topics on cocos2d, but this is one of the stronger
ones.
Search WWH ::




Custom Search