top | item 6866310

Spelunky Procedural Level Generation

71 points| peterderivaz | 12 years ago |tinysubversions.com

13 comments

order

adnzzzzZ|12 years ago

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|12 years ago

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|12 years ago

Same happened for me, works fine in Canary

mappu|12 years ago

Yep, consistently crashes Chrome 32.0.1700.41

wreegab|12 years ago

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|12 years ago

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.

mildtrepidation|12 years ago

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|12 years ago

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.

Ogre|12 years ago

It's really not much like Lode Runner at all. Lode Runner itself was a "clone" of Space Panic much more so than this is a "clone" of Lode Runner. In both cases, there is clear inspiration drawn from the earlier game, but they are very much original works.

I wrote a shareware Lode Runner clone on the Amiga 20+ years ago. Mine was definitely a clone, no bones about it. Spelunky is barely related.

coderzach|12 years ago

No it's totally different, try actually playing the game.