indienova.com 网站上有好几篇讲随机地图的文章, 都是不同的算法. 你可以选择适合你自己游戏的.
https://www.indienova.com/indie-game-development/rooms-and-mazes-a-procedural-dungeon-generator/
https://www.indienova.com/groups/post/795?utm_source=cowlevel
https://www.indienova.com/indie-game-development/roguelike-3d/
https://www.indienova.com/indie-game-development/roguelike-dungeon-building-algorithm/
https://www.indienova.com/indie-game-development/generate-tile-based-maze-with-backtracking/