Game Development Reference
In-Depth Information
As Mario navigates the game level, the game camera follows his movements, show-
ing a portion of the level corresponding to the character's position at any time.
When scrolling backgrounds are involved, there are several techniques that are used
to obtain the effect of continuity of the background image and to give the illusion of
depth to players.
Tiles
Tiles are images that are cut so that they can be put one close to each other without
the player noticing the end of the first image and the beginning of the second. All
images are then put close to one another to obtain a larger composition, called tile-
set, which contains all the elements needed to create the backgrounds of the game.
Most available game engines allow using tiles to create seamless backgrounds for
your games. The advantage of this technique is that it saves system memory for the
creation of your game levels; a tileset is a relatively small image that can be used to
create endless levels through the repetition of its elements.
The following is a figure that shows a tileset to create a Zelda-like 2D game (courtesy
of WesleyFG from http://wesleyfg.webs.com/tiles.html ).
The parallax motion
The parallax motion is a technique that consists of putting different images on sep-
arate layers and then letting the code scroll those layers at different speeds. The
layers closer to the player character scroll faster, while those farther from the char-
acter scroll slower. The final effect is that the character and the elements close to it
Search WWH ::




Custom Search