Uncovering the backbeat behind Spelunky's random levels

Mossmouth's Spelunky is a game with two complimentary pillars: It's brutally difficult, and its levels are randomly generated. Darius Kazemi's Spelunky Generator aims to lift a bit of the fog surrounding the latter.

Kazemi created the tool with a modded copy of the original, PC version of Spelunky to deconstruct how the game creates a randomly generated "solution path." Before adding any of the enemies, traps or treasures, Spelunky lays out 16 rooms on a four-by-four grid, beginning with a "start room" on the top row. The game then chooses from four basic room types and assembles the map like Lego blocks.

In a part two of his analysis, Kazemi, who ported Spelunky to the web with HTML5 last year, explains how the game's individual rooms are laid out using templates.

For more on the Xbox 360 version of the game that was released last year, be sure to check out Polygon's Spelunky review.

More from Polygon

Hearthstone: Naxxramas Overview

  • Oddworld: New 'N' Tasty - Overview video

  • Destiny's beta comparison video: PS4 versus Xbox One

  • The Crew closed beta - Overview video

  • Polygon goes to Poland

Latest Discussions

Log In Sign Up

Log In Sign Up

Forgot password?

We'll email you a reset link.

If you signed up using a 3rd party account like Facebook or Twitter, please login with it instead.

Forgot password?

Try another email?

Almost done,

By becoming a registered user, you are also agreeing to our Terms and confirming that you have read our Privacy Policy.



Choose an available username to complete sign up.

In order to provide our users with a better overall experience, we ask for more information from Facebook when using it to login so that we can learn more about our audience and provide you with the best possible experience. We do not store specific user data and the sharing of it is not required to login with Facebook.