I am trying to make a procedural map similar to a game called "Unrailed!"


I used perlin noise based on Sebastian Lague's video, as you can see below, the water would always be generated surrounding the rock because based on how perlin noise works, which is not what I wanted.

Is there any other method to generate the map like Unrailed? Or am I using perlin noise wrongly?

my generated map

  • 3
    \$\begingroup\$ By the way: You might want to look into Simplex noise instead of Perlin noise. It fixes some of the problems inherent in Perlin noise (like directional artifacts) while also being a bit faster, and the patent on it expired last year. \$\endgroup\$
    – Philipp
    Jan 15 at 10:22

1 Answer 1


A common method is to layer multiple instances of a noise pattern.

For example, you can generate the water by sampling the noise starting at offset a:b and then as a next step generate the rocks by sampling the noise starting at c:d, where a, b, c and d are all pseudorandom numbers.

If I had to guess what they did in the screenshot above, I would guess that they did that for different terrain features in this order:

  1. water
  2. trees
  3. rocks

This technique also allows you to use different frequencies for different terrain features or even experiment with using different noise algorithms for different features.

  • \$\begingroup\$ This is a good idea, but then I would have to decide on whether to replace the water with rocks or not replace if they overlap, so I would need to decide based on how much rocks or water I want on the map? What do you think? \$\endgroup\$
    – ento
    Jan 15 at 10:41
  • \$\begingroup\$ @ento The fun thing about procedural terrain generation is that it leaves a lot of room for creative experimentation. I don't know your game so I don't know what kind of terrain would work for it. So I recommend you to be creative in experimenting with different noise patterns and how to combine them. Keep in mind that you don't need to take only one of the patterns into account when placing things. For example, the likeliness of rocks could depend mainly on the mountain-pattern but also slightly depend on the water pattern at the same location, so that you have fewer rocks near coasts. \$\endgroup\$
    – Philipp
    Jan 15 at 13:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .