Parallax scrolling

Template:Technical

Parallax scrolling is a special scrolling technique in computer graphics. It gives a 2D video game a greater sense of depth and immersion by creating the illusion of a third dimension. There are three main methods of parallax scrolling used in titles for video game console systems. Parallax scrolling was first used in the 1982 arcade game Moon Patrol. Parallax scrolling, in short, simply means the background moves by slower than the foreground, creating an illusion of depth. This technique grew out of the multiplane camera technique used in traditional animation since the 1940s.

The layer way

Some display systems support multiple background layers that can be scrolled independently in horizontal and vertical directions and composited on one another. On such a display system, a game can produce parallax by simply changing each layer's horizontal position by a different amount in the same direction. Layers that move more quickly are perceived to be closer to the virtual camera. However, placing too much in front of the playfield, the layer containing the objects with which the player interacts, obscures the action of the game and may distract the player.

The raster way

In raster graphics, the lines of pixels in an image are typically composited and refreshed in top-to-bottom order, and there is a slight delay, called horizontal blank, between drawing one line and drawing the next line.

Some display systems have only one layer. These include most of the classic 8-bit systems (such as the Nintendo Entertainment System and the original Game Boy). Games on such systems generally divide the layer into horizontal strips, each with a different position and rate of scrolling. Typically, strips higher up 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 effect" and is also useful for changing the system palette to provide a gradient background.

Some platforms (Super NES, Sega Genesis, Game Boy Advance, Game Boy) provide a horizontal blank interrupt 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. Many NES games such as the classic Super Mario Bros. use this technique to draw their status bars, and Teenage Mutant Ninja Turtles II: The Arcade Game and Vice Project Doom for NES use it to scroll background layers at different rates.

More advanced raster techniques can produce interesting effects. A system can achieve breathtaking depth of field if layers with rasters are combined; Sonic the Hedgehog 2, ActRaiser, and Street Fighter II used this effect well. If each scanline has it's own layer, the Pole Position effect is produced, which creates a pseudo-3D road (or in the case of NBA Jam, a pseudo-3D ball court) on a 2D system. If the display system supports rotation and scaling in addition to scrolling, an effect popularly known as Mode 7, changing the rotation and scaling factors can draw a projection of a plane (F-Zero, Super Mario Kart) or can warp the playfield to create an extra challenge factor (Tetanus On Drugs).

The sprite way

If there is much in the way of the sprites (individually controllable moving objects drawn by hardware on top of or behind the layers) available on the display system, the programmer may want to make a pseudo-layer out of sprites. Star Force, an overhead-view vertically-scrolling shooter for NES, used this for its starfield, and Final Fight for Super NES used this technique for the layer immediately in front of the main playfield.

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools