2D Backgrounds

Hi everyone,

I’m looking to create a background like the one seen here: https://youtu.be/EbNJ1U1wZpg?t=108 (it’s a clip from Toss the Turtle for those familiar).

Basically, it’s a 2D background that moves with the player. I’ve had some luck by using panning, but my new problem is creating the upper part of the image for when the player moves high enough.

So, in this case, the game can go all the way into space. Is the only course of action to create a very tall image that has ground, space and all the inbetween stuff and have it panning? Or is there a more efficient method?

Hope this was clear enough!

Thanks for your time.

EDIT: I forgot to mention that I’m also having trouble with the placement. I can’t attach the image to the camera because then it looks like the player is never moving up or back down, since the camera is following them. The game is also procedurally generated (it’s basically an endless runner with verticality). Any help is much appreciated!