Parallax scrolling: Difference between revisions

Content deleted Content added
Zagrebo (talk | contribs)
Repeating pattern is a layer method
Line 4:
 
An interesting variation is to have the background and foreground move in ''opposite'' directions. This creates an effect of rotation. An early example is the scene in ''[[Snow White and the Seven Dwarfs (1937 film)|Snow White and the Seven Dwarfs]]'' where the evil Queen drinks her potion, and her surroundings appear to spin around her.
 
==The repeating pattern/animation method==
Scrolling displays built up of individual character blocks can be made to 'float' over a repeating background layer by animating the background characters in order to portray the parallax effect. This was often achieved using a scrolling star-field, but sometimes a more intricate or multi-directional effect was achieved, such as in the game ''Parallax'' by [[Sensible Software]].
 
== The layer method ==
Line 13 ⟶ 10:
=== The sprite method ===
If there is much in the way of the [[sprite (computer graphics)|sprite]]s (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 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 character blockstiles can be made to 'float' over a repeating background layer by animating the backgroundindividual characterstiles' bitmaps in order to portray the parallax effect. This wassoftware effect gave the illusion of another (hardware) layer. Many games used oftenthis achievedtechnique usingfor a scrolling star-field, but sometimes a more intricate or multi-directional effect was achieved, such as in the game ''Parallax'' by [[Sensible Software]].
 
== The raster method ==
Line 18:
Games designed for older graphical chipsets, such as those of the [[History of video game consoles (third generation)|third]] and [[History of video game consoles (fourth generation)|fourth]] generations of video game consoles, those of dedicated [[TV game]]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 System]], the original [[Game Boy]], and the [[PC Engine]]). GamesThe 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 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 (computing)|palette]] to provide a gradient background.
 
Some platforms ([[Super Nintendo Entertainment System|Super NES]], [[Sega Mega Drive|Mega Drive/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, or timers inside game cartridges that generate interrupts after a given number of scanlines have been drawn. 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.