about summary refs log tree commit diff
path: root/src/Xanthous/Generators/CaveAutomata.hs
AgeCommit message (Collapse)AuthorFilesLines
2020-05-11 Add ViewPatterns to default-extensionsGriffin Smith1-1/+0
Seems relatively harmless
2019-12-30 Add dungeon level generationGriffin Smith1-18/+13
Add a dungeon level generator, which: 1. generates an infinite sequence of rectangular rooms within the dimensions of the level 2. removes any duplicates from that sequence 3. Generates a graph from the delaunay triangulation of the centerpoints of those rooms 4. Generates the minimum-spanning-tree of that delaunay triangulation, with weights given by line length in points 5. Adds back a subset (default 10-15%) of edges from the delaunay triangulation to the graph 6. Uses the resulting graph to draw corridors between the rooms, using a random point on the near edge of each room to pick the points of the corridors
2019-09-20 Add doors and an open commandGriffin Smith1-1/+1
Add a Door entity and an Open command, which necessitated supporting the direction prompt. Currently nothing actually puts doors on the map, which puts a slight damper on actually testing this out.
2019-09-15 Remove all but the largest region in cavesGriffin Smith1-0/+3
When generating cave levels, remove all but the largest contiguous region from the resulting level.
2019-09-14 Fill the outer edges of generated levelsGriffin Smith1-0/+1
To avoid the character being able to go OOB. This is something we had in the Rust version but I hadn't ported over yet
2019-09-13 Place the chacracter in the level at startup timeGriffin Smith1-2/+2
Randomly select a position in the largest contiguous region of the generated level in which to place the character at startup time.
2019-09-07 Add cellular-automata cave generatorGriffin Smith1-0/+112
Add a cellular-automata-based cave level generator, plus an optparse-applicative-based CLI for invoking level generators in general.