Check it out, not that complicated actually, but many useful techniques:
Spelunky level generation:
Develop games in your browser. Powerful, performant & highly capable.
thnx very informative xoros
Nice, does it have an increase in difficulty, or is it just how many levels you can make it through?
I think difficulty increase is another topic, could be achieved by spawning more or harder enemies/obstacles.