
Spelunky Procedural Level Generation  - peterderivaz
http://tinysubversions.com/spelunkyGen/
======
adnzzzzZ
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.

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.

------
GyrosOfWar
The site crashes my browser (rather, the tab it's running in, Chrome 32) I see
a loading bar, then I see something resembling a Spelunky level for a few
seconds and then it crashes.

~~~
johtso
Same happened for me, works fine in Canary

------
wreegab
Why is the image constantly redrawn?

EDIT: Ok at first there were no moving creatures in it. I see why it is
redrawn, now my question would be more like: why is the _whole_ image
constantly redrawn? (Dirty rectangle goes a long way).

~~~
dariusk
Hi, author of the site here. Spelunky was made using GameMaker 8, and I ported
it to GameMaker Studio and used its HTML5 exporter to get it working in
Chrome, then I modded the core game from there for this tool.

So: the reason it's constantly redrawn is because GameMaker redraws the whole
screen.

But also, it's important to note that GameMaker is meant to be general purpose
game engine. Dirty rectangles work great if you're building very specific
kinds of games where only small portions of the screen are updating at any
time. For a game like Spelunky, which is a platformer where the whole screen
moves (aka there's fast "camera" motion), it doesn't provide very large
performance boosts at all. I don't work on GM so I can only guess but I'm
pretty sure it's a combination of a super-legacy engine (GM is 15 years old
and hasn't had a complete rewrite ever) as well as a need to be as flexible as
possible.

~~~
wreegab
> "For a game like Spelunky, which is a platformer where the whole screen
> moves"

Ok. It's because from here nothing moves. Using Chrome 30 on Linux Mint.

~~~
dariusk
Right, it doesn't move in this version. This is a mod of the full game, which
does move quite a bit. I wasn't going to rewrite the entire core render loop
for the original game just for this weekend hack.

------
mildtrepidation
That's pretty cool! I'm not seeing any mention of Lode Runner on the main site
or the original game page, though... it's a pretty obvious clone (that's not a
complaint or jab, and it looks like you've made some cool additions), so it
seems like a tip of the hat would be in order. Perhaps I missed it?

~~~
techtalsky
Yeah, loderunner is one of its far inspirations, but honestly you have no idea
the depth of play of Spelunky. Game designer Derek Yu made an all-time-classic
only a few years ago in Gamemaker. It's a platformer-roguelike with
permadeath, level generation, and a profoundly tuned sense of difficulty that
rewards repeat play. There's also lots of surprises and secrets for a
determined player.

