The mountains are scrolling behind the towers! How can this be possible without a third background plane?
The effect in question was previously discussed in this Sega 3D Classics interview for 3D Shinobi III. (Scroll down to "What it took to make 3-1 3D".) Essentially, as the background plane scrolls, the game directly overwrites the mountain graphics in VRAM with one of the following patterns, based on the camera's horizontal position:
Because each pattern is identical to the last, except shifted horizontally by a single pixel, running them in the opposite direction of the camera creates the illusion of an additional layer further back, scrolling at an even slower speed.
This trick was first seen in Sonic 2's Hill Top Zone, but Sonic 3 elevates it to an art form, using it in almost every stage. No more than eight separate patterns are ever needed; since tiles are 8 pixels across, switching everything one tile over ensures the proper continuation.
I think a post about how the Mega Drive does parallax scrolling and what the limitations are would be useful for this one. "An introduction to Mega Drive graphics, part 2" covers part of it, but doesn't mention that graphics can scroll in front of other (static) graphics all within one background plane. The way the beginning of this post was written made it seem like the shrubs and towers were on different planes and I got all confused.
ReplyDeleteSorry if this post wasn't exactly clear. I think you're right, I should have outlined the basic parallax effect beforehand. There's a chance for me to get back to this in an upcoming post, so I'll just push that up the pipeline.
DeleteThe gist of it is, graphics *can't* scroll in front of other graphics within the same background plane. Yet everything is on one plane.
As the camera moves horizontally, the game DMAs different images over where the mountains are. The illusion of an extra layer is created by having these images all be identical, except shifted horizontally one pixel at a time.
So if, hypothetically, the mountains weren't moving at all, the game would still need to DMA the mountain graphics to display in the gaps between the structures with each frame? I definitely think this concept deserves a post of its own, it seems my noob brain is having trouble with it.
Delete(Same guy as above, I've just decided to ditch the anonymity from now on)
Think of it this way: if you replaced the eight mountain patterns above with the letters A, B, C, etc, then when the camera scrolls left and right the ENTIRE mountain range would quickly flip through the letters of the alphabet.
DeleteThe mountains only look like they're moving because all the patterns look alike.
Amazing content, a lot of amazing websites which is actually new for me
ReplyDeletetile repair