2
\$\begingroup\$

I'm new to game development and I need some advice. I'm building a web based 2d random map generator and I wonder which algorithms there are to create such random terrains in a simple matrix as seen in the images below. It would be great if anyone could point me to some terms/algorithms as I have absolutely no clue what to search for.

Note: I'm not interested in depth/biomes - just the generation of those 2d shapes that grow from a starting point.

I tried implementing it in several ways - but all attempts seem rather childish and don't really produce the desired result. First I started with a small pattern like a plus (5 cells) and replicated it always on the edges of the already generated cells. Another way was to define cubes in different sizes and then start to generate big cubes in any direction, after that put medium cubes on some random edges, then again with smaller ones etc.

Any tips are very much appreciated!

enter image description here enter image description here enter image description here enter image description here

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Fractals, cellular maps, perlin/simplex noise maps \$\endgroup\$
    – Nadir
    Commented Apr 8, 2018 at 23:58

1 Answer 1

1
\$\begingroup\$

If you are interested in generating maps that grow from a starting point, the formal names of the relevant topics are:

  • cellular automata (for instance, using the 4-5 rule to generate caves)
  • L-systems & other replacement grammars
  • artificial life (for systems that model simple organisms such as yeast, etc)

That being said, it is not apparent what particular family of algorithm was used to generate the image you posted. Personally, I think it looks less like something that was 'grown' & more like a Perlin/simplex noise island, but it's not possible to come to any strong conclusions from the single image.

\$\endgroup\$
1
  • \$\begingroup\$ I updated my post with some more images in case you can now tell which it might be. I will also have a look at those algorithms you mentioned. Thanks! \$\endgroup\$
    – bladebytes
    Commented Apr 9, 2018 at 7:04

You must log in to answer this question.

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