Simple random dungeon generator written in Rust. Based on a method originally described by Mike Anderson
If you would like to contribute, please submit a pull request. I will gladly accept any improvements or clean-ups to the code.
Translated from this c++ algorithm.
Sample usage:
let mut d = Dungeon::new(50, 50);
let max_features = 35;
d.generate(max_features);
d._print_dungeon();
Sample output:
############
#,,,,,,,,,,#
############+#############
#.....#..........# #,#
#.....#..........# #,#
#.....#..........# #,# ###
#.....#..........#### #,# #,#
#.....#..........##,# #,# #,#
#.....#..........##,# #,# #,# ###
#.....+..........##,####,# #,#####,# ###
#.....#..........##,#,##,# #,#,,,#,###########,#
#.....#..........##,#,##,###,#,#,#,,,,,,,,,,,#,#
#.....#..........##,,,##,,,#,#,#,#,#########,#,#
#.....#.>........####+####,#,#,#,#,# #,#,#
#.....#..........# #....##,#,,,#,#,#########,#,#
#.....######+#######....##,#####,,,,,,,,,,,#,#,#
#+##### #.......+....##,#####,#######+###,#,#
#,,,,# #.......#....##,#,,,,,##,# #...##,,,#
###### #.......#######+#+######,# #...##,###
###.......# #.........+,# #...##,#
####### #,+.......# #.........### #...####
#,,,,,# #,#.......# #.........# ###...#
#+########,####+#########.........# #,#...#
#....###,,,#............#.........###,#...#
#..<.+,,,#,#............#.........#,#,#...####
#....#,#,#,#............#.........#,#,######,#
######,#,#,#............#.........#,#,# ####,#
#,#,#,#............#.........+,#,# #,##,####
#,###,#............#.........###,# #,##+##,#
#,# ###............+.........+,,,# #,#...#,#
#,# #............#############+###,#...#,#
#,# #............# #.....#,+...#,#
### #............# #######.....+,#...+,#
#............### #.....#.....###+#####
#............#,###.....#.....#,,,#
#............#,#,#.....#.....#####
#####+#######+##,#,+.....#####+########
#,,,,,# #,##,#,#.....# #,,,,,,,,#
#######,# ###,##,#,#.....# ########,#
#,,,,,,,# #,,,##,,,####### #,#
#######,#####,#,####,##### #,#
#,,,,##,#,,,,,,,,,,# #,#
##,####,#,#####,####### #,#
#,,,,#,### #,,,,,,,# #,#
###,###,# ######### ###
#,,,# #,#
###,# #,#
#,,,# ###
#####