FrankenStein

Cave procedural generation

Recommended Posts

Welcome!

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.