grid.erl that I posted last time. A dungeon-like map:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%.................%%%%%%%%%%%..........%%%%%%%%%%%%%%%.......%%%%%%%%%%%%%%%%
%%%%.%%%%%%%%%%%%%%%..................%%%..............%%.%%%%%.............%%%%
%%............%.%%%%.......%...........%%%%......%%%%.@%%.%%.@..%%%%.........%.%
%%........%%..%.%%%%+......%...............<..^.*%%%%...........%%%%%%%%%%%.%%&%
%%.%......%%..%.%%%%!......%..........%%%%%.......%%%.....%%....%%%%%%%%%%%.%%%%
%%..............%%%................!..%%%%%..........%%.%%%%....%%%%%%%%%%%..%%%
%%........%%..%.%%%.+......%...&..............+.........%%%%.%%%%%%%%%%%%%%%!%%%
%%%%......%%..%.........^^............%%%%%......%%%%...%%%%.%%%%%%%%%%%%%%%.%%%
%%%%......%%..%.%%%.%%%%%%%%%%%%%%%.%.%%%%%......%%%%%%.*.%%.%%%%%%%%%%%%%%%.%%%
%%%%......%%..%.%%%.%%%%%%%%%%%%%%%.%.%%%%%......%%%%%%%%........%%%%%%%%%%%.%%%
%%%%%%%.%%%%%%%.%%%.%%%%%%%%%%%%%%....%%%%%%%%%%%%%%%%%%%%%...%%.%%%%%%%%%%%.%%%
%%..................%%%%%%%%%%%%%%..%%%%%%%%%%%%%%%%%%%%%%%%%................%%%
%%*%%%%%%%.%%%%%%%%%%%%%%%%%%%%%%%.........*........%%%%%%%%%.%...%%%%%%%%%%.%%%
%%.%%%%%%%.%%%%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%%%%%%%.%%%%%%%%%.%%%..*%%%%%%%%.%%%
%%.%%%%%%%..@...............%%%%%%.%%%%%%%%%%%%%%%%..%%%%%%%%.%%%%%.!.%%%%%%.%%%
%%.^.................%%%%%%.%%%%%%.%%%%%%%%%%%%%%%%%.%%%%%%%%.%%%%%%%...%%%%.%%%
%%%%%%%%%%%%%%%%%%%%.%%%%%%.^%.....%%%%%%%%%%%%%%%%%.%%%%%%%%.%%%%%%%%%....+.%%%
%.......%%...%%%%!.....%%%%..%.%%.....%%%%%...................%+...%%%%........%
%.&%%...%%...%%%%......%%%%...........%%%%%.....%%%%.%%%%%%%%%%....%%%%..%%....%
%%%%%...%%...%%%%..............%%...............%%%%.........%%....%%%%%.%%%.>.%
%%%%%...%%...%%%%......%%%%%%..%%.....%%%%%..%%%%%%%%%%%%%%%.%%....%%%%%.%%%...%
%%%%%...%%...%%%%......%%%%%%..%%%....%%%%%..%%%%%%%%%%%%%%%.............%%%.&.%
%%%%%...%%%%%%%%%......%%%%%%%%%%%%%%%%%%%%@.%%%%%%%%%%%%%%%%%%....%%%%%%%%%...%
%%%%%%%%%%%%%%%%%......%%%%%%%%%%%%%%%%%%%%@.%%%%%%%%%%%%%%%%%%....%%%%%%%%%...%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A town-like map:
...............t................t......f.F................F.....t...............
t..............FF.....FF......t.t.......................ff.f....................
...F...t....F..........^...t.................ft.......F.........F...............
.^.t.ff....f.F....t................tf..................t...f..^....f...F........
.^..####..f......T....Ff.f.T.........t###..#####...........#########..######^...
...F#==#F.##############..##########F.#=#..#====#########..#=======#..#=-==#....
.f..#==/..#============/F.#========#..#=#..#============/..#=======/.f#=-==/.f..
..F.####..#============#..#========#..#=#F.#=====-======#..#=======#..#====#....
..F.......#============#T.#========#..#-/.f##############..#########..######....
..........#####========#..#========#..#=#t.................................^..F.
..F..f.........#=======#..#=====-==#..#=#.........^.t........f...t......t.......
..^........T..f#=======#Ft#========/.F#=#.......F...F........^........^.....t...
............f..#########..##########..###.................................^...t.
........................t.F.t......t.F..............................F...t.......
.#######..####..................##########.###......f.....F.....F....###........
.#=====/..#-=/T....######.####..#========#t#=/..........###..........#=#.....f..
.#=====#..####.^.f.#====/.#==#t.#========/.#=#...#######==#...#######==#.......F
.#=====#....^..F..F#====#.#==#..#========#.#=#...#========#.f.#========/........
.#====-#........###=====#.#==#..#========#.#=#T../========#...##########...f....
.#=====#..f.....#=======#.#==#^.#========#.#=#..f#========#.................f...
.#######...f....#=======#.#==#..#========#.#=#...#========#.ft.........^....T..F
......t^.......t#=======#.#==/..##########.#=#...#========#.....................
^...........t...#=======#.#==#.............###...#========#...f....t............
................#########f####...................#========#.....................
...T.....^..t.....................t..............##########......T......t.......
.................f.......................F............f.........................
f.........T...............F......F..............t.............t..t....f.........
A "natural" scene, right for a swamp or a forest clearing:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%....%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%%%%%%%%%%%%%%%%.%%
%%%%%%%%%%%%%%%%%%%%%....%%%%%%%%%%%%%%%......&.....%%%%%.......%%%%%%........%%
%%%%%%%%%%%%%%%%%%%%%%%%....%............%%%%..........%%.%%...............%%%%%
%%%%%%%%..................&........................................!....%%%%%%%%
%%%............................................................%*....%%.%%%%%%%.
%%%%%%%%......%%%.....+.............!.......................%%....%%%%%%%%%%....
%%%%%%%%%%%%%........%...%%%%...........&.%%%%%%%%%..............%%%%%%%%....%%%
%%%%%%%%%%%%%%%%%%.........................%%%%%%%%%%%.......................%%%
%%%%%......*........^..@.......%....@....%....%%%%%%%%...%%............%%..%.%%%
%%%%%%%%%%%%%%%...%......@..........%%%%.........%%%%...%.....%%.............%%%
%%%%%%%%%%%%%...........................*......%..........%%.........%%..%%%%%%%
%%%%%%%%%%%%%%%...........%.....%............................%..%%%%.....%%%%%%%
%%%..............%%%%........%%..........................................%%%%%%%
%%%%%%%............................................................%%..%..%%%%%%
%%%%%%%%%%%%%%..@@..................................&.....%%.!........%%%..%%%%%
%%%%%%%%%%%%%%%%....................%...............%%......%%%.+........%..%%%%
%%%%%%%%%%%.........*..................................%%%%......%...........%%%
%%%%%%%%%%.....&................!..............+.........%%%%...........%%%^..%%
%%%%%%%%%%%%%%%%%%%%..%%%..................................%%%%...%.......%%%%%%
%%%%%%%%%%%%%%%%%%%%%...........%%%%%%.%..!...%.%%%%..........%.^...%....+..%%%%
%%%%%%%%%%%%%%%%%^.......%%%%%...%%%%%^...+.%.....%%%%%%%%..............%%%.%%%%
%%%%%%%%%%%%%........%%..%%%%%%...%%%%%...%%%%%%%.....%%%%%%%..%.......*..%%%%%%
%%%%%%%%%........%%%%%%%..................................................%%%%%%
%%%%.........%%%%%%%%%%%%%%%%%%%%%%...%%%%%%%%%%%%%%%%%%%.%%.%%%%%%%%%%%%.%%%%%%
%%%%.....%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%%%%%%%%%%
.....%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
There they were - 100% Erlang.
3 comments:
I like the diagonal hall in your dungeon map. Previously I had tried to create a dungeon generator while doing a 7day roguelike contest. Many rooms were cut off and not accessible. Your maps don't seem to have that problem.
Hey thanks - I actually kind of cheated there - I wrote in a final step to connect the points between stairs so that no exit would be isolated. I also wrote a primitive 'edge-detection' function to find isolated rooms.
Drool. I love it. I will be generating maps all day... goodbye productivity. ;)
-m
Post a Comment