Hi everyone, just curious if anyone has ever done one of those endless running style games and how they achieved the randomness/unlimited level aspect?
From what i understand you would just have a random selection of objects and every second (or more ?) spawn the object in front of the player?
how do you get the player to constantly move forward (faster and faster)
how do you place/generate your next set of objects?
Instead of moving the player, I would instantiate the level objects outside the screen and move them towards the player and once they leave the screen I would delete them. This way you can control the speed of the gameplay easily.
You can create a couple of prefabs representing platforms with traps etc. and instantiate them. The more prefabs you have, the more random level you get.
You can also create a spawn manager script with an array of objects to spawn so you would have a little control over the levels. This way you would only let the later levels to spawn harder traps for example. Or you could create different themes and mix those themes too.