Docs

Seamless parallax backgrounds

One reference picture per map in. Depth layers that scroll forever without a seam out.

See also: Looping parallax

sunpetal-crossing-scene.png

maps/ · 12.4 MB · the layers alone, scrolling without end

3 min
for both maps: eight layers and their loops, drawn alongside the ground, portals and ladders
$3.66
estimated, for 14 drawings and repaints and 2 reviews

A side-scrolling level is drawn in layers: a sky, a far horizon, a midground, and a band in front of the player. The camera moves each one at its own speed, and that difference is what reads as depth. Every layer has to repeat without end, and a strip whose two ends do not meet shows a seam once every period. Mirroring the strip hides the seam and shows every landmark twice, facing itself. FX Games draws each layer from the map's reference picture and tests it as it came back. A layer that does not loop has its own wrap moved to the middle of a canvas the image model repaints, and the repaint is cut back in along the path where it agrees with the drawing. The wrap and both cuts are measured against the layer's own columns, and the layer is trimmed and placed for the game.

Try it

Make the scrolling backgrounds for a side-view platformer map from 1this picture, with FX Games' map layers described in godot/games/bellweather/docs/map-generation-contract.md. Start from a copy of the Bellweather package in godot/games/bellweather/inputs/default, put the picture in references/, and describe the map's layers far to near in its file under maps/, as maps/sunpetal-crossing.toml does, with loop_construction = "seam_repaint".

Plan it first. Then build the world part live, and show me every layer tiled across its wrap, with the path where each repaint was cut in.

+

Paste it into an agent that can use this repository, and attach your own files where the prompt refers to them.

Use it

Drag to scroll, or click and use ← →; Space pauses

LayerMoves atRepeats everyHow it loopsMove downSize

The layers alone, scrolling without end. Pause them, change the camera's speed or direction, or drag the picture to scrub. Turn any layer off to see what is behind it, change how fast it moves, or move and resize it. Mark the joins and look for a seam at any of them.

The same layers in a level: the map's own ground, and a character to walk it.

Click here, then ← → to walk, Shift to run, ↑ or Space to jump

LayerMoves atRepeats everyHow it loopsMove downSize

Walk and jump across either map; the platforms are the map's own grid. The far layers barely move, the midground moves at a little over half the camera's speed, and the band in front passes faster than the ground. Both tables share one tuning, so a change in either shows here, in the view above and at the top of the page. Each layer is baked for this page the way the game bakes it: resized to the 720-pixel view, then given its contrast, saturation, haze and blur by the game's own formulas.

From one drawing to a seamless loop

The village as the model drew it
Tiled, its two ends do not meet
The model repaints a window with the wrap at its middle
Cut back in where the two pictures agree
Tiled again, with no seam
⇆
What the model was givenWhat it painted
Drag across the picture. The window is the layer's own end set against its own start, so the join runs down its middle, between the two ticks: here it slices the big cloud and steps the ridge. The dashed lines mark the span the model was asked to repaint. It repaints everything it is sent, a little differently each time, which is why only the stretch between the two cuts is kept. The window shown is the exact one sent: rebuilt from the drawing when this page was built, and matched to the digest the request recorded.
⇆
What the model was givenWhat it painted
The same on the village, where the join cuts through the windmill and the trees beside it.

What you get

maps127 files, 95.6 MB
NameSizeKind
sunpetal-crossing40.1 MBFolder, 61 files
layers26.3 MBFolder, 44 files
sunpetal_village.png1.4 MBOne layer: exactly one period wide, trimmed to its content
sunpetal_village.loop.json36 KBHow it was looped: the wrap and both cuts, where each fell and how it measured
sunpetal_village.validation.json3 KBIts trim, its placement and its last loop check
composite.png4.7 MBEvery layer and the ground on one board, for the reviewer
review.json2 KBThe reviewer's verdict
and 1 more folder the pipeline keeps for recovery and auditing

The game's manifest carries each layer's plane, order, scroll speed, anchor and placement, so a game places and scrolls the layers without measuring anything.

Where it works

Works well

  • A side-scrolling level drawn in a few depth layers, far to near
  • Cut-out layers with transparency, and opaque backdrops
  • Any scroll speed, including a band in front that passes faster than the ground
  • A layer the model already draws as a loop, which is published untouched at no extra cost

Not expected to work

  • Loops across only; nothing repeats vertically
  • A landmark standing right on the wrap can be painted over by the repaint
  • A plain gradient: the model cannot repaint one to within a level of its own steps, so a gradient sky falls back to its reflection. An empty gradient reflected is the same picture, and these skies never move.

Good to know

  • Two of the six moving layers, the garden fence and the bell-tree route, came back already looping, and cost nothing more.
  • A join passes when it steps no more than the layer's own columns do. A fixed limit either misses a flat seam or refuses the detail of the art itself.
  • The reviewer passed both maps' looping, ground and layering. It still rejected them: Sunpetal lacks the bridge and stream its reference shows, and on both maps it judged the portal and ladder sheets at their full drawn size rather than as the game places them.
  • Each layer's size and height come from the game's own map files, so the far peaks stand behind the village and nothing shows between the layers even without the ground.

What goes wrong by hand

By handIn the graphHow
The two ends of a strip do not meet, and a seam passes by once every period.The wrap is moved to the middle of a canvas the model repaints, and the repaint is cut back in along the path where it agrees with the drawing.
Mirroring the strip hides the seam, and every landmark shows up twice, facing itself.The period stays the width that was drawn. Nothing is appended or reflected.
A seam is judged by eye, at one zoom, on one screen.The wrap and both cuts are measured against the layer's own columns, and the loop is checked again after trimming.
Every layer is repainted, whether it needed it or not.Every layer is tested first; one that already loops is published untouched.
Nobody looks at the layers together.A board of every layer and the ground is judged by a model that drew none of it.

Models and tools

GPT Image 2.5 SunburstOpenAIImage model
GPT-5.6 SolOpenRouterReviewer
Pillow and NumPylocalFind the path where each repaint agrees with the drawing, cut it in, and trim and place every layer