Over the coming weeks/months, I’ll be writing a series of brief posts on how I’m implementing the procedural overworld generation that will feature in Lenna’s Inception. The text in these posts will be light; most of the content will be screenshots.

I started this subproject this week by prototyping some basic procedural overworld generation in Python.

The first phase creates some generic Perlin noise.

I want mountains in the North and a big sea in the south, so the next step applies some weighting on a gradient to the noise.

Then everything is blockified (using the max of the surrounding pixels rather than the average, which seems to produce wider, flatter plateaus later on).

The terrain is thresholded to give flat areas suitable for tiling. I use the gradient to place cliffs on the southern faces.

The next steps for this will be:

  • Joining up some of the lakes into a river.
  • Analyzing the map to give a graph of traversable areas with links between adjacent ones that can become caves, ladders, bridges. I’ll be able to use this in an enhanced version of metazelda to place dungeon entrances and other important locations such as towns.
  • Tiling!

Related articles online

I found these links particularly inspiring. You might see ideas from them crop up in future posts on the overworld of Lenna’s Inception.



blog comments powered by Disqus