What's a good way to generate random clusters and paths?

后端 未结 5 1851
星月不相逢
星月不相逢 2020-12-28 19:51

I\'m toying around with writing a random map generator, and am not quite sure how to randomly generate realistic landscapes. I\'m working with these sorts of local-scale map

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-28 20:13

    To expand on academicRobot's comments, you could start with a default marsh or forest seed in some of the grid cells and let them grow from the source using a correlated random number. For instance a bog might have eight adjacent grid cells each of which has a 90% probability of also being a bog, but a 10% probability of being something else. You can let the ecosytem form from the seed and adjust the correlation until you get something that looks right. Probably pretty easy to implement even in a spreadsheet.

提交回复
热议问题