Re: Ninja Spirit & Parallax.

From Chris Covell <xxxxxx@direct.ca>
Date
As far as I know, on a system with only 1 background, there are 4 ways to
simulate parallax:

1) (Simplest) Use sprites to simulate parallax motion.  A lot of the
"background" in GOT is constructed of sprites.  Same for the bottom part of
the screen on the first level of Magical Chase.

2) (Simple) for a background of clouds, or water, or some kind of plane going
off into the distance, have the scroll register increase to varying degrees
based on some kind of scanline interrupt.  This isn't really parallax, because
objects in the background aren't really going past each other, or on top of
each other; they're just being scrolled at different speeds.  This technique
is used all the time in TG, SNES, Gen, even NES games.  A prime example of
this on the TG is the final boss of Dracula X.  The clouds at the top and
bottom of the screen scroll much faster than those in the middle.

3) (Tougher) simple tile-replacement, where on a system that is tile-based
instead of bitmap-based, have a set of tiles in RAM, and each time the
scrolling increases, swap those tiles into the video memory location of the
same tile.  This is used to good effect in MetalStorm on the NES, and of
course, Ninja Spirit on the TG.  On the first level of NS, the "parallax"
background is limited to 8x8 tiles.  If you look closely, you'll see square
blocks above the breaks in the "bamboo" that don't have any parallax behind
them.

4) (Toughest) masking parallax, where a foreground that has transparent bits
is superimposed (in RAM, not video memory) on top of an image of the
background.  A mask of the foreground is used so that the background image is
made to show through any transparent bits in the foreground.  That combined
image is then transferred to video RAM.  The processor does all the work here,
so I don't know if any TG games do this.  Do any real programmers know?

-- 
Chris Covell (xxxxxx@direct.ca)
http://www.sfu.ca/~ccovell/
Solar Wars (NES) Homepage!