So I first created a parser that could detect "edges" in an ASCII "image"
Then the script will knock out wall in the ASCII image to create a maze.
This can generate irregularly shaped mazes, based on the ASCII template.
Source code is at:
Python2: https://github.com/sevkeifert/text-utils/blob/master/maze-ify-ascii.py
Python3: https://github.com/sevkeifert/text-utils/blob/master/maze-ify-ascii-v3.py
USAGE:
maze-ify-ascii.py -f YOUR_TEMPLATE_FILE
For example, here's a basic grid:
Grid with holes:
Oblique
Irregular shape, with holes, multiple regions, text, and protected whitespace
Now for Part II: parsing the space *inside* font characters:
No comments:
Post a Comment