Map Generator #2

Added from last time, I created a second layer of the map that marks which cells are part of which contiguous region. Currently the only regions recognized are land masses and bodies of water. In the future I will most likely also define rules to recognize hilly and mountainous regions. The regions themselves are discovered using a simple floodfill. The next step after this has me a little intimidated, as it will be to use spline curve approximations to vectorize the regions.

The code as it stands takes shortcuts – for example, the program will abort if more than 200 regions are discovered, as the region list is statically allocated. As things continue along rough edges like this will be dealt with.

Have a look:

Color terrain gen

1 comment

Comments are closed.