Infinite level generator

Im trying to make a game like Run but i want to make a script that will generate the level along with non moving enemies. I am trying to think how the script will be but i literally have no idea. Any help would be appreciated. Most of my code is in c# so if anyone wants to help with code please write it in c# if you can. Js is accepted as well

I think you will have to give a bit more. To create an infinite runner, you are going to need sections. Each section should be added to the previous via points according to some data that goes along with each.

Say you have a “I” section, that section has 1 start and 1 end point, A “L” has the same, but the end point is turned 90 degrees. A “T” would have 2 end points.

Now, with a series of tiles, you now want to start generating. Say, start with an “I”, then generate 2 out. “I” then an “L” To position the I, you will need to instantiate the “I” and set it’s position (start point) to the end point of the preceding tile. The “L” is the same way, start to end. Next, you run onto the second “I” and it generates a new tile “T” That “T”'s start point is placed on the “L”'s end point and is rotated according to the “L”'s end point (90 degrees)

Coin points, obstacles, monsters or whatever are simply points defined on the tile. You can do groups or singles. Just assign a script to control each tile randomly.

Maybe this would be a better forum to post this?