Game dev
Saved & recent

Parallax scrolling

Background layers that move at different speeds when the camera scrolls. Far layers move slowly and near layers move fast, the way distant hills seem to crawl past a car window.

It is a cheap way to suggest depth in a 2D game. Each layer's offset is the camera position times a factor below 1.

Further reading
Godot Engine: 2D Parallax
far ridge middle hills near fence
The ridge, hills and fence scroll through the same 410-unit width in 24, 12 and 5 seconds respectively. Each arrow shows the relative speed of its layer.

View in the full Game dev collection