2D Parallax
Quick Summary
2D Parallax (Parallax Scrolling) is a computer graphics technique creating the illusion of depth within a closed 2D space. This effect is produced by setting the lateral (or vertical) scrolling speed of background layers at different rates — distant layers move slower than foreground layers closer to the player.
Illustration: The characteristic layering structure of the Parallax Scrolling technique. As the camera moves the screen right, the black tree layer in the foreground scrolls past very quickly, while the purple mountain range in the background moves extremely slowly — creating the optical illusion of spatial depth.
The first application in the Arcade machine generation was the game Moon Patrol (1982). The Parallax optical technique then became the backbone of the entire Side-scrolling era (Horizontal scrolling graphics).
Algorithm Operating Mechanism
A 2D Parallax system is built on the mathematical rendering trick of static image Sprite Layers. Rather than moving the entire background like a connected piece of paper, designers decompose the world into 3 to 8 transparent vector layers.
When the player entity moves along the X axis, the camera routing algorithm begins to affect each layer with different variation coefficients:
- Layer 1 (Character & Interactive Ground): Moves at 100% actual speed.
- Layer 2 (Mid-distance trees): Scrolls laterally at 70% speed.
- Layer 3 (Distant hills): Scrolls laterally at 30% speed.
- Layer 4 (Sky/Static moon): Scrolls laterally at 1%–5% speed to maintain the virtual infinite horizon ratio boundary.
Application in Modern Visual Design
In the new super-generation hardware era, 2D Parallax has not been replaced by native 3D technology. It has evolved into a high-end artistic technique for simulating depth without expensive system resource usage (System Overload) in Indie games.
Games like Hollow Knight or Ori and the Blind Forest have pushed this technique to its limits by layering micro-light files and particle fog interspersed between background layers — creating deep, majestic graphic spaces where the physical Hitbox collision system still only processes on a single flat 2D physics grid — ensuring player command response latency reaches millisecond amplitudes.