Game Development Reference
In-Depth Information
2 . Screen tearing occurs when the graphical data changes while the electron
gun is drawing one frame. The best way to avoid screen tearing is to use
double buffering, and to only swap buffers during VBLANK.
3 . If a single-color buffer is used, it means that in order to prevent screen
tearing, all rendering must be completed during the relatively short
VBLANK period. But with double-buffering, the only work that must be
completed during VBLANK is the swapping of buffers, and there is much
more time to render the scene.
4 . The painter's algorithm is a rendering technique where the scene is
rendered back to front. This is similar to the way a painter might paint a
canvas. The painter's algorithm works relatively well for 2D scenes.
5 . Sprite sheets can net huge memory savings because it is possible to pack
in sprites more tightly than it might be with individual sprite files. There
also can be performance gains from the fact that with sprite sheets, source
textures do not have to be changed as frequently in the hardware.
6 . In single-direction scrolling, the camera's position should update when the
player has advanced past the midpoint of the screen.
7 . A doubly linked list would work best, because it would be possible to
point to both the previous background segment and the next background
segment.
8 . A tile set contains all the possible images that can be used for the tiles.
Each tile in the tile set has a corresponding ID. The tile map, on the other
hand, lists out the IDs of the tile layout of a particular scene or level.
9 . By storing the animation FPS as a member variable, it makes it possible to
alter the speed of an animation as it is playing. For example, a run anima-
tion could start playing more rapidly as the character moves more quickly.
10 . An isometric view displays the world from a slight angle, so there is a
greater sense of depth.
Chapter 3: Linear Algebra for Games
1 . Solutions:
a. 5, 9, 13
b. 4, 8, 12
Search WWH ::




Custom Search