← All Essays
Technology 9 min read

Parallax Scrolling

How 2D games faked depth by borrowing a trick from 1930s animation, and why the Mega Drive built it into silicon

A Trick Older Than Games

Parallax is not a computing idea. It is a fact about vision: objects nearer the observer appear to move more across the visual field than distant ones, which is why the fence beside a moving car is a blur while the mountains behind it barely shift. Traditional animation had been exploiting this since the 1930s with the multiplane camera, a rig that separated a scene into physically distinct layers of artwork at different distances from the lens and moved them at different rates. Depth from flat drawings, achieved mechanically.

Games inherited the technique directly. Jump Bug (1981) used a limited form in the arcade; Moon Patrol followed in 1982 with the full expression of the idea, running three separate background layers at three different speeds behind the playfield. Nothing about the underlying principle had changed since Disney's animators worked it out — what changed was that the layers were now made of pixels and the camera was a raster display.

What the Hardware Actually Does

The mechanic is disarmingly simple in principle. A game holds several background layers and, each frame, offsets each one by a different amount in the same direction. Layers moved further per frame read as nearer; layers that barely budge read as distant. Nothing is rotated, scaled, or projected — the depth is entirely in the differential rates, and the player's visual system supplies the rest for free.

Layers need not sit behind the action. Placing one in front of the playfield produces foreground elements that sweep past the camera — pillars, foliage, crowd silhouettes — which deepens the scene and can also deliberately obscure the player's view, an effect designers have used both to enrich atmosphere and to make life harder. The playfield itself is just one layer among several, distinguished only by being the one the player interacts with.

The Genesis Builds It In

Sega's Mega Drive, in 1988, was the first console to support true hardware parallax scrolling: two background planes that the video display processor could scroll at independent rates without the CPU intervening. Its VDP went further, supporting line-scrolling and row-scrolling — the ability to offset individual scanlines or rows differently — which allowed effects considerably more elaborate than two flat planes sliding past each other. Waves, heat haze, curving roads, and pseudo-3D floors all fall out of the same capability.

This was a meaningful competitive advantage and Sega used it. The visual signature of the Genesis era — those layered, rushing backgrounds in Sonic and Thunder Force — is substantially a consequence of parallax being free in hardware rather than expensive in software. The lineage ended with the Saturn, the last home console to support hardware parallax, which could drive six independent scrolling planes; by then the industry was moving to polygons, and depth would be computed rather than implied.

Faking It Without Silicon

Systems without hardware support did it anyway, using a technique that reveals how intimate 1980s programming was with the display itself. The trick is to wait for the horizontal blank — the brief interval as the electron beam returns to start the next scanline — and change the layer's scroll position in that gap, before the hardware draws the line. Do this every scanline and different bands of the screen can scroll at different speeds despite the machine having no notion of multiple planes. These are raster effects, and they require code synchronised to the beam sweeping across a CRT.

The C64 and countless arcade boards produced convincing parallax this way, which is worth dwelling on: the programmer is not describing a scene to a graphics system but manually intervening in the act of drawing, dozens of times per frame, timed to microseconds. It is the clearest illustration of what the phrase "close to the metal" actually meant. When the Genesis put parallax in silicon it was not introducing a new effect — it was industrialising something programmers had been hand-crafting against the raster for years, and freeing them to spend those cycles on something else.