★ TouchArcade needs your help. Click here to support us on Patreon.

how do you program infinite levels , like canabalt

11-18-2010, 09:04 PM
#1
Joined: Nov 2010
Location: Where dreams become reality
Posts: 258
how do you program infinite levels , like canabalt

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 .
11-18-2010, 09:15 PM
#2
Joined: Apr 2009
Posts: 12
Quote:
Originally Posted by Krehol Games View Post
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.
11-18-2010, 09:19 PM
#3
Joined: Apr 2009
Location: USA
Posts: 2,437
i think he is asking how to code for a random never ending game mode, where secotion are generated randomly

ssɐ sıɥ dn ɯǝɥʇ ǝʌoɥs puɐ sƃuıɹ dıɥsuoıdɯɐɥɔ sǝıɹǝs plɹoʍ ㄥᄅ sǝǝʞuɐʎ ǝɥʇ ǝʞɐʇ uɐɔ ıpɹɐɹıƃ ǝoɾ
11-18-2010, 09:29 PM
#4
Joined: Nov 2010
Posts: 13
You could have a certain number of segments, and generate a random number that corresponds with each segment...

Developer of Space Laser Race.
Website: tanzerine.com // spacelaserrace.com
Follow us on Twitter! twitter.com/tanzerine
11-19-2010, 04:25 AM
#5
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
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...