Jump to content

Cave procedural generation


Recommended Posts


Interesting procedurally generated levels are hard! Hence a lack of beginner tutorials! There is a procedural generation wiki, the quality and relevance of articles varies wildly but there is some good stuff in there, pretty sure I've read something from there specifically referencing spelunky.

There are lots of different algorithms for procedurally generating terrain, from 'walking' algorithms to using seeded number generators to produce some 'consistent' randomness (yes, that is a thing!), and lots and lots of other stuff.

Walking algorithm can be used to fill or remove sections from a terrain map i.e. take a full terrain map (assume 2 dimensional, say 10x10, each tile can be either solid or air, lets go with all solid to start with), create a number of seeds (walkers) with varying properties and iterate over a number of rounds, each round consist of the walker making decisions. So, for example, a walker may be allowed to move one square in any random direction and convert that new square into air, after 10/20/50 iterations you're going to see some random passages appear. This is an example of cellular automata to procedurally generate a 'world'.

That is only one example, and the 'walking' algorithm could be paired with several other algorithms, all adding stuff to your generation. Rich's example has a fairly detailed explanation of another algorithm, in a similar fashion it sounds like it iterates over a number of steps, introduces some randomness, and generates a world. Many examples of procedural generation work this way.

Link to comment
Share on other sites

1 hour ago, FrankenStein said:

I've seen it, the problem is that the canvas is hidden after it loads, i tried 3 web browser, proxy and everything, and it didn't work

Appears fine here. Normal stable release of Chrome, nothing special. The canvas appears at the start, then vanishes, but then as soon as I scrolled it re-appeared again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...