Generating random tunnels
- by IVlad
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:
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;
Ideally, it should be possible to efficiently generate it with smooth curves, not rectangles as in the above game;
I should be able to know in advance what its bounds are, so I can detect collisions and generate powerups inside the tunnel;
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.