Game Development Reference
In-Depth Information
Parallax scrolling
As it was mentioned in Chapter 1 , Starting the Game , continuous backgrounds and
foregrounds for games are created using small images tiled together, creating an il-
lusion of a very long graphic strip. The more pieces the game has, the more varied
is the appearance of the strip. Although this is only a compilation of flat images, an
artistic illusion of 3D space can be created to divide the scenery by individual lay-
ers, changing their position at various speeds. The foreground will move normally, the
further ones will be slower and the most distant will almost stand still. Such a visual
scene convinces the viewer that it has depth, interpreting it as the natural physical
phenomenon known as parallax . It characterizes the apparent alteration of a vis-
ible object's position against a far background when viewers changes their location.
The closest objects change their position very noticeably (in other words, they have a
pretty big parallax), but the distant ones alternate only a bit (small parallax). The most
spectacular and vivid example of parallax in action can be observed from a window of
a moving car: the landscape flows irregularly; objects on roadsides, such as bushes
and utility poles, move quickly; more distant elements, such as houses and trees,
move slower; and hills or mountains on the horizon are snail like, but the sky looks
like a fixed image. By moving in the car, viewers change their position constantly. Be-
ing in such a state enables them to see the incessant demonstration of parallax. The
following figure shows a character in motion who faces parallax:
The artificial graphic landscapes can utilize the same principle to look convincing.
For the first time such an idea was adapted by traditional animators. As you know,
the drawn animation was based on the layer system: moving pictures were created
on stacked transparent cells (sheets made of celluloid), which are as flat as ream.
But, the transparent layers were distributed at some distance between each other
and arranged in an improvised cabinet, and so multiplane camera was invented. Walt
Disney patented the device in 1940. It helped to simulate the behavior of real-world
scenery because all components have different distances from the camera lens and
react accordingly to the natural parallax formula. It was a model of three-dimensional
landscape with depth based on separate flat images. The first cartoon that demon-
Search WWH ::




Custom Search