So I am making a game in Unity3d and it gives the option to switch to an "endless runner" mode, the thing is I wanted to understand the logic or algorithm needed t