Noëlle Anthony 14b211ca51 Added documentation, cleaned some code up. | il y a 7 ans | |
---|---|---|
CellMap.py | il y a 7 ans | |
README.md | il y a 7 ans | |
procgen.py | il y a 7 ans |
Basic proof of concept for a “cellular automata” model. No real refinement at this point.
Initial work based on this tutorial.
This script requires the Pillow package. You can install it with
pip3 install Pillow
It takes the following flags:
If you use --out, width and height are in pixels.
If you don’t, height is lines of text, and width is measured in chunks of two characters; “--width 40” will produce a map 80 characters wide. This is because each “wall” cell is represented by a double I character and each “empty” cell is represented by a double space; in the font the developer uses, this makes it so that if a map’s width and height are the same, the map is roughly square.
Smaller maps blown up to a larger size sometimes look better than larger maps, for some reason. The --chunky flag doubles the size of each cell, which makes the raw output twice as big and slightly more attractive. Use with caution on larger image sizes.