Iam trying to figure out in C langauge an easy way to make infinite levels like in canabalt . I have done some myself but never comes out nearly as smooth .
Infinite levels is a game design concept, and has nothing to do with the language in which you're writing code.
i think he is asking how to code for a random never ending game mode, where secotion are generated randomly
You could have a certain number of segments, and generate a random number that corresponds with each segment...
What Tanzerine said... Plus: You could have some segments being more likely to be chosen than others. You would also possibly want to keep track of the last couple of segments used, so that you don't have the same one appearing next to each other...