By Alex Tomjack
Initially created for CSCE 3110 final project. Randomly generates a layout of rooms and doors using user-provided parameters. Also allows for pathfinding between two points selected by clicking on the image.
The provided exe will run out of the box. If you want to run the script itself, Python 3.10+ should first be installed, as well as the PIL library using pip:
pip install Pillow
Once this is finished, the program is run by running main.py
The exe is created using pyinstaller (installed using pip) with
pyinstaller --onefile main.py
The program begins with a randomly generated map using default parameters. To generate your own map, adjust the parameters using the sliders, and press "Generate".
The map consists of floors (the brown tiles), doors (the red tiles), and walls (the grey tiles).
It is also possible to play an animation showing the steps that created the map:
Map.Generator.2022-09-21.22-39-35_Trim.mp4
The pathfinding works by clicking clicking on two floor or door tiles. You can not select walls or empty tiles.
Once the second tile is clicked, a path will be displayed:
You can pathfind again by clicking another set of points.