Display 2 backgrounds at the same time

The effect I want to achieve is that when the player moves, it appears to be changing the landscape behind them.

If it were just a static background it’d be easy, but I want the two backgrounds to scroll along with the player, so the player appears to be walking between two worlds. I’m trying to present the idea that the character is changing the world as they move through it: the world in front will be a wasteland, the world behind will be filled with flowers and sunshine

The only workaround I can think of is to make a bunch of frames of a moving background and animate the sprites when the player moves forward, and that’s a lot of images to make. I’d like a better method if possible.

Would love any suggestion if someone has an idea.

I think you could achieve that effect with layers and have a transparent sprite behind the player which shows the past world (on a specific layer), whereas the rest of the game area is current/future world on the base layer. Or you could reveal the layer in other ways. There’s a cool Black Thorn Prod game which has a similar sort of effect as a core mechanic of the game but it’s made in Unity. He ties the effect to the position of the mouse in some cases.

I have been trying to think on it but I can’t seem to wrap my head around it. I would love to see an example of this code so I can try to understand how it works.

I tried to play the game you posted but it wouldn’t load for me. It stuck on the Unity icon for about a minute. I don’t know if this is because itch was lagging or some problem with the game.

Without a better solution, I devised a workaround.
I wrote an event that is basically a particle emitter but with a little more control over what is generated.
It generates a set of happy fluffy clouds behind the player and dark ominous clouds in front of the player, and the happy fluffy clouds get deleted when their X position is greater than player X position, and the dark ominous clouds get deleted when their X position is lower than player X position.

The effect works just the way I want it to, but I’m still adjusting the textures and emission properties to make the effect look as good as possible. As it is now, it looks only “ok” at best and creates a bit of lag.