Continuous Runner?

Hey programmers :smiley:

I’m making a 2D side scrolling runner. But i want it to be a one level game. What i mean with that is that it randomly generates parts of the level all the way to you die.

how do I fix this?

I know its not a lot of details… But please try to help :smiley:
I will contribute with more info if you want so :smiley:

Thank you in advance :smiley:

Well, few information so I will say using what I think I understood.

So you want your guy to go to the right and as he goes some random “furnitures” shows up.

You could store for example 4 different objects in an array of object.

Then, every x value you generate a random index to choose between 0 and 3 (array starts at 0 but you knew that already). Then your furniture is chosen you just need to place it with an instantiation.

Now you have objects coming in until you die (not you, your player…).

But how do I write that code?
Thats my big problem…