Python PNG Maze Generator
Project description
python-maze
Generates a PNG maze. Thanks to Orestis Zekai for the original algorithm.
Included Maze Types
Line maze
- Grid with separate wall segments
- Generates 2 PNGs -- one solved, one unsolved
- Every grid square is usable as a maze cell
- Can make more interesting maze generation by adding iterations
- Iteration is currently very simple -- it's set to maximize the length of the solved path
- Smart Mode: Turn on for generating smarter mazes, that make up more of the area
- Usage:
usage: line_maze.py [-h] [-H HEIGHT] [-W WIDTH] [-S] [-I ITERATIONS]
optional arguments:
-h, --help show this help message and exit
-H HEIGHT, --height HEIGHT
how high to make the maze
-W WIDTH, --width WIDTH
how wide to make the maze
-S, --smart optimize the maze by being smart
-I ITERATIONS, --iterations ITERATIONS
how many times to try
Multithreaded Line Maze Generator
- Generates line mazes, using smart mode
- May melt CPU's
- Defaults are:
- 50 by 50 maze
- iterated 100 times
- 10 threads
- Currently the best maze generator in this repo.
- Usage:
usage: multithreaded_maze.py [-h] [-H HEIGHT] [-W WIDTH] [-I ITERATIONS] [-T THREADS]
optional arguments:
-h, --help show this help message and exit
-H HEIGHT, --height HEIGHT
how high to make the maze
-W WIDTH, --width WIDTH
how wide to make the maze
-I ITERATIONS, --iterations ITERATIONS
how many times to try
-T THREADS, --threads THREADS
how many threads to spawn
Line Maze Example:
Line Maze Example:
Square maze
- Kept for historical purposes only. Don't use this. It probably doesn't even work.
- Grid
- Solving/Optimization isn't working yet
- Uses grid squares for walls
- Usage:
python square_maze.py <maze_height> <maze_width>
Fair warning:
This code is horribly inefficient, and large mazes take quite a long time to generate, especially if they are run through many iterations
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python_maze_generator-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3e69fd72feb45cf4d050ac1a7453fdf625d977384d1a384e31a4fc612533411 |
|
MD5 | 669aca0c8555a4b31a4623306156611f |
|
BLAKE2b-256 | 7c542b8ff3cf051445120bb939a814b655a87061361c58e28da26baf53358fe3 |
Close
Hashes for python_maze_generator-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02da46c5458450a2097dd2d01bdbbcc4524ea3a78a15a5c6a599eb1fafee1e3d |
|
MD5 | f70fb20d85532ee3e36b1857d3e2243f |
|
BLAKE2b-256 | 53dd72b5b38fa39ab1fa8d9f0c454faf9200e4b9687102db41f48b72c9de5b1f |