How Spelunky's levels are generated

With procedurally-generated game content being the hot issue of the weekend, what better time to get a closer look at how indie hit Spelunky used the programming technique to generate its endlessly-explorable caverns? A perfectly tuned mix of apparent randomness and clever structural design, Derek Yu's game yields its secrets thanks to Darius Kazemi, who hacked the code to show entire levels at a glance. (Note that the generator works only on Chrome).

If you're unfamiliar with Spelunky, well, kiss goodbye to your morning.