Generating random tunnels

Posted by IVlad on Game Development See other posts from Game Development or by IVlad
Published on 2012-09-28T21:13:25Z Indexed on 2012/09/28 21:51 UTC
Read the original article Hit count: 198

Filed under:
|
|

What methods could we use to generate a random tunnel, similar to the one in this classic helicopter game? Other than that it should be smooth and allow you to navigate through it, while looking as natural as possible (not too symmetric but not overly distorted either), it should also:

  1. Most importantly - be infinite and allow me to control its thickness in time - make it narrower or wider as I see fit, when I see fit;
  2. Ideally, it should be possible to efficiently generate it with smooth curves, not rectangles as in the above game;
  3. I should be able to know in advance what its bounds are, so I can detect collisions and generate powerups inside the tunnel;
  4. Any other properties that let you have more control over it or offer optimization possibilities are welcome.

Note: I'm not asking for which is best or what that game uses, which could spark extended discussion and would be subjective, I'm just asking for some methods that others know about or have used before or even think they might work. That is all, I can take it from there.

Also asked on stackoverflow, where someone suggested I should ask here too. I think it fits in both places, since it's as much an algorithm question as it is a gamedev question, IMO.

© Game Development or respective owner

Related posts about algorithm

Related posts about maps