- Home /
Infinite Background
Hello guys , I need this for an endles runner game . What is the best way to generate infinite backgrounds ? Short tutorials would be most appreciated as I am out of time. Thanks in advance.
You mean a skybox? Or more like a scrolling skybox?
If you mean a scrolling background image, then you basically calculate the overall size of the background, and when the player gets to a certain point, you move the first background to the front, and keep doing this, essentially recycling your background. It should be relatively easy since you would only be dealing with a single axis.
Answer by StormMuller · May 21, 2017 at 12:11 AM
So what I usually do is have a pool of two or three background images and then as soon as the first one is out of sight I just move it to the end. If you've implemented parallaxing or other complex background techniques, then you might have to add layers to your pool.
Hello , thanks for the answer . Is there anyone to know how I need to position the backgrounds because I am having a hard time having them attached to each others. There always appear to be a gap between them
Your answer
Follow this Question
Related Questions
Endless 2D background 4 Answers
Looping background 1 Answer
Instantiate objects in a specific order 2 Answers
Infinite Length of Terrain/Loop Terrain 1 Answer
2D Dog-fighting Difficulties 0 Answers