2d endless runner help!

I’m trying to make a endless 2d runner that has to jump over obstacles which is really simple… (like the “line runner” game)
I have some prefab obstacle that i’ve prepared and currently working with orthographic camera.
Can somebody provide me a code that will allow me to randomly generate obstacle?? ( A simple cube will be nice)
Does anyone have a project file that u could send me?? Thanks in advancee

You can check

something you can start with…

it gives you a pretty good idea on how to implement it… of-course you must have advanced knowledge in c#-Unity…

hope this helps :slight_smile:

I don’t think anyone will give you the actual code. We usually don’t do that here. We will help you with it. If you need to make something random, use Random.Range. You could, of course, also use Random.value. If you need some fancy, smooth, random generator, you can use Perlin noise (at least that is what worked for me). There used to be an example project for procedural generation that included a Perlin noise. I think there is also one on the Unify Community Wiki.

Hey If you are looking for 2D Endless Running with Jumping, I had found a reference game: “Mojo Run” from the Unity asset store.

Hope it helps you… Thanks…