Skip to content

chauler/MapLayoutGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map Layout Generator

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.

Installation

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

Usage

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".

image

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:

image

You can pathfind again by clicking another set of points.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages