Loop the whole scene?

I see there are ways to make a scrolling/repeating backgrounds, but is it possible to loop the whole scene? This would allow me to add laps to my sidescrolling race.

I figured a few possible things;
I could teleport them back to the start when the reach the end, but I’m not sure how smooth this would be. I would need to figure out a way to record the object’s angle, velocity, and vertical position, so it is relocated the same way, making it look seamless. Then there is the question of moving the camera so it looks like it continued scrolling on, rather than being abruptly moved back.

Then there are the moving background tricks. I could attempt to see if any work with the ‘solid/interactive’ parts of the scene. I would assume this would cause the scene itself to be moving.

Finally, I could just copy and paste to repeat it a few times. Quick, easy and simple, but still has problems. The objects that vehicles interact with (like movable boxes) will appear to have ‘reset’ each lap. This would also greatly increase the size of scenes, possibly impacting computer performance.

Any hints/tips/ideas?

1 Like

Then there are the moving background tricks. I could attempt to see if any work with the ‘solid/interactive’ parts of the scene. I would assume this would cause the scene itself to be moving.

This idea of yours seems better and least effort needed, can’t wait to give your game a shot :slight_smile:

I was able to figure out how to seamlessly teleport the player back to the start.
Use the non-physics “in collision with” and non-physics “change the position”, plus the camera.
Now I just need to figure how to make a ranking system so there can be more than two racers.

2 Likes