This is pretty amazing. I'm working on a game that's going to use level generation techniques pretty similar to Spelunky, and while the other explanations on that guy's blog were pretty good, this adds another level of understanding.<p>The surprising thing about Spelunky and its generation is that you would expect that manually designed templates, even if put together in a sort of random way, would get repetitive or old pretty fast. And this would be the case if Spelunky didn't have what the author called probabilistic tiles and obstacle blocks (see Rogue Legacy for an example where it does get repetitive pretty fast). But even after >100 hours playing it it's still not easy to recognize all templates and to know what to expect next, which keeps the game fresh and new every time you play it.