Parallax scrolling is a special
scrollingIn computer graphics, filmmaking, television production, and other kinetic displays, scrolling is sliding text, images or video across a monitor or display. "Scrolling", as such, does not change the layout of the text or pictures, or but incrementally moves the user's view across what is...
technique in
computer graphicsComputer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....
, popularized in the 1982
arcade gameAn arcade game is a coin-operated entertainment machine, usually installed in public businesses such as restaurants, bars, and amusement arcades. Most arcade games are video games, pinball machines, electro-mechanical games, redemption games, and merchandisers...
Moon Patrolis a classic arcade game by Irem that was first released in 1982. It was licensed to Williams for distribution in North America.The player controls a moon buggy, viewing it from the side, that travels over the moon's surface. While driving it, obstacles such as craters and mines must be avoided....
. In this
pseudo-3D2.5D , 3/4 perspective and pseudo-3D are terms used to describe either:* 2D graphical projections and techniques which cause a series of images or scenes to fake or appear to be three-dimensional when in fact they are not, or* gameplay in an otherwise three-dimensional video game that is...
technique, background images move by the camera slower than foreground images, creating an illusion of depth in a 2D video game and adding to the immersion. The technique grew out of the
multiplane cameraThe multiplane camera is a special motion picture camera used in the traditional animation process that moves a number of pieces of artwork past the camera at various speeds and at various distances from one another...
technique used in
traditional animationTraditional animation, is an animation technique where each frame is drawn by hand...
since the 1940s.
Methods
There are four main methods of
parallaxParallax is a displacement or difference in the apparent position of an object viewed along two different lines of sight, and is measured by the angle or semi-angle of inclination between those two lines. The term is derived from the Greek παράλλαξις , meaning "alteration"...
scrolling used in titles for
video game consoleA video game console is an interactive entertainment computer or customized computer system that produces a video display signal which can be used with a display device to display a video game...
systems.
The layer method
Some display systems support multiple background layers that can be scrolled independently in horizontal and vertical directions and
compositedCompositing is the combining of visual elements from separate sources into single images, often to create the illusion that all those elements are parts of the same scene. Live-action shooting for compositing is variously called "chroma key", "blue screen", "green screen" and other names. Today,...
on one another. On such a display system, a game can produce parallax by simply changing each layer's position by a different amount in the same direction. Layers that move more quickly are perceived to be closer to the virtual camera. Layers can be placed in front of the
playfield—the layer containing the objects with which the player interacts—for various reasons such as to provide increased dimension, obscure some of the action of the game, or distract the player.
The sprite method
Programmers may also make pseudo-layers of
spritesIn computer graphics, a sprite is a two-dimensional image or animation that is integrated into a larger scene...
—individually controllable moving objects drawn by hardware on top of or behind the layers—if they are available on the display system. For instance
Star Forceis a vertical shoot 'em up arcade video game made in 1984 by Tehkan . In Japan, it is considered to be a monumental work among shooting games...
, an overhead-view vertically scrolling shooter for
NESThe Nintendo Entertainment System is an 8-bit video game console that was released by Nintendo in North America during 1985, in Europe during 1986 and Australia in 1987...
, used this for its starfield, and
Final Fightis a side-scrolling beat-'em-up game originally released by Capcom as a coin-operated video game in . It was the seventh game released by Capcom for their CP System arcade game hardware...
for the Super NES used this technique for the layer immediately in front of the main playfield.
The repeating pattern/animation method
Scrolling displays built up of individual tiles can be made to 'float' over a repeating background layer by animating the individual tiles' bitmaps in order to portray the parallax effect. This software effect gives the illusion of another (hardware) layer. Many games used this technique for a scrolling star-field, but sometimes a more intricate or multi-directional effect is achieved, such as in the game
Parallax by
Sensible SoftwareSensible Software was a software house active during the 1980s and 90s, from the United Kingdom.The company was well-known for the very small sprites used for the player characters in many of their games, including Sensible Soccer, Cannon Fodder and Sensible Golf.- Early history :Sensible Software...
.
The raster method
In
raster graphicsIn computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...
, the lines of pixels in an image are typically composited and refreshed in top-to-bottom order with a slight delay (called the horizontal blanking interval) between drawing one line and drawing the next line.
Games designed for older graphical chipsets—such as those of the
thirdIn the history of computer and video games, the third generation began on July 15, 1983, with the Japanese release of both the Nintendo Family Computer and Sega SG-1000...
and
fourthIn the history of computer and video games, the fourth generation began on October 30, 1987 with the Japanese release of Nippon Electric Company's PC Engine...
generations of video game consoles, those of dedicated
TV gameA TV game is an interactive entertainment device designed for use on a television set that does not require the use of an actual video game console for operation...
s, or those of similar handheld systems—take advantage of the raster characteristics to create the illusion of more layers.
Some display systems have only one layer. These include most of the classic 8-bit systems (such as the
Nintendo Entertainment SystemThe Nintendo Entertainment System is an 8-bit video game console that was released by Nintendo in North America during 1985, in Europe during 1986 and Australia in 1987...
, the original
Game BoyThe , is an 8-bit handheld video game device developed and manufactured by Nintendo. It was released in Japan on , in North America in , and in Europe on...
, and the PC Engine). The more sophisticated games on such systems generally divide the layer into horizontal strips, each with a different position and rate of scrolling. Typically, strips higher on the screen will represent things farther away from the virtual camera or one strip will be held stationary to display status information. The program will then wait for horizontal blank and change the layer's scroll position just before the display system begins to draw each scanline. This is called a "
raster effectA raster scan, or raster scanning, is the rectangular pattern of image capture and reconstruction in television. By analogy, the term is used for raster graphics, the pattern of image storage and transmission used in most computer bitmap image systems...
" and is also useful for changing the system
paletteIn computer graphics, a palette is either a given, finite set of colors for the management of digital images , or a small on-screen graphical element for choosing from a limited set of choices, not necessarily colors .Depending on the context In computer graphics, a palette is either a given,...
to provide a gradient background.
Some platforms (e.g.,
Super NESThe Super Nintendo Entertainment System is a 16-bit video game console that was released by Nintendo in North America, Europe, Australasia , and South America between 1990 and 1993. In Japan and Southeast Asia, the system is called the , or SFC for short...
, Mega Drive/Genesis,
Game Boy AdvanceThe is a 32-bit handheld video game console developed, manufactured, and marketed by Nintendo. It is the successor to the Game Boy Color. It was released in Japan on March 21, 2001; in North America on June 11, 2001; in Australia and Europe on June 22, 2001; and in the People's Republic of China...
,
Game BoyThe , is an 8-bit handheld video game device developed and manufactured by Nintendo. It was released in Japan on , in North America in , and in Europe on...
,
Nintendo DSThe is a portable game console produced by Nintendo, first released on November 21, 2004. A distinctive feature of the system is the presence of two separate LCD screens, the lower of which is a touchscreen, encompassed within a clamshell design, similar to the Game Boy Advance SP...
) provide a
horizontal blank interruptA horizontal blank interrupt is a programming technique used in some systems, notably video games and consoles, to allow program code to be run in the periods when the display hardware is turned off, waiting for the TV to complete its horizontal blank, which takes about 10 μS.The technique was only...
for automatically setting the registers independently of the rest of the program. Others, such as the NES, require the use of cycle-timed code, which is specially written to take exactly as long to execute as the video chip takes to draw one scanline, or timers inside game cartridges that generate interrupts after a given number of scanlines have been drawn. Many NES games use this technique to draw their status bars, and
Teenage Mutant Ninja Turtles II: The Arcade Game and
Vice: Project DoomVice: Project Doom, released in Japan as , is a multi-genre action game developed by Aicom and published by Sammy for the Nintendo Entertainment System in . It is a side-scrolling platform game similarly to the Ninja Gaiden series for the NES, with the addition of gun shooting and driving segments...
for NES use it to scroll background layers at different rates.
More advanced raster techniques can produce interesting effects. A system can achieve a very effective depth of field if layers with rasters are combined;
Sonic the Hedgehog,
Sonic The Hedgehog 2Sonic the Hedgehog 2 is a 16-bit 1992 platform video game that was developed by Sonic Team members working at the Sega Technical Institute, and published by Sega for the Sega Genesis console. It was released in Japan on November 21, 1992 and in North America and Europe on November 24, 1992...
,
ActRaiseris a 1990 Super Nintendo Entertainment System action and city-building simulation game developed by Quintet and published by Enix that combines traditional side-scrolling platforming with urban planning god game sections. A sequel, ActRaiser 2, was released for the Super Nintendo in 1993...
, and
Street Fighter IIis a competitive fighting game originally released for the arcades in . It is the arcade sequel to the original Street Fighter released in and was Capcom's fourteenth title that ran on the CP System arcade hardware...
used this effect well. If each scanline has its own layer, the
Pole Position effect is produced, which creates a pseudo-3D road (or a pseudo-3D ball court as in
NBA JamNBA Jam is a basketball arcade game developed by Midway in 1993. It is the first entry in the NBA Jam series, and was written entirely in assembly language. The main designer and programmer for this game was Mark Turmell...
) on a 2D system.
If the display system supports rotation and scaling in addition to scrolling—an effect popularly known as
Mode 7Mode 7 is a graphics mode on the Super NES video game console that allows a background layer to be rotated and scaled on a scanline-by-scanline basis to create many different effects. The most famous of these effects this can create is the application of a perspective effect on a background layer...
—changing the rotation and scaling factors can draw a projection of a plane (as in
F-Zero and
Super Mario Kartis a go-kart racing video game developed by Nintendo EAD for the Super Nintendo Entertainment System . The first game of the Mario Kart series, it was launched in Japan on August 27, 1992, in North America on September 1, 1992, and in Europe on January 21, 1993. Selling eight million copies...
) or can warp the playfield to create an extra challenge factor (e.g.,
Lockjaw: The Overdose).
Example
In the following animation, three layers are moving leftward at different speeds. Their speeds decrease from front to back and correspond to increases in relative distance from the viewer. The ground layer is moving 8 times faster than the vegetation layer. The vegetation layer is moving two times faster than the cloud layer.