Help with Endless Backgrounds and Platform Generation

I found a video on youtube with advanced code for endless platform generation but I was wondering if their is away to have random generation for top down shooter game I have been designing atop down shooter game about a women but when I get to a certain point of the screen the grass texture stops please help give me some tips and pointers maybe point me to a direction of a how to tutorial Thanks :slight_smile:

Have 2 instances of your background sprite, one above the other.

Check if the y position of the background sprite is off the bottom of the screen. If it is, decrease the background image’s y position by 2 * height of the background (it’s twice, otherwise it get’s drawn on top of the other background image, not above it)

1 Like