{"id":28629784,"url":"https://github.com/codebox/mazes","last_synced_at":"2025-06-12T12:13:37.203Z","repository":{"id":37699654,"uuid":"412831762","full_name":"codebox/mazes","owner":"codebox","description":"JavaScript Maze Generator","archived":false,"fork":false,"pushed_at":"2022-01-10T10:59:06.000Z","size":364,"stargazers_count":27,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-05-14T17:00:54.634Z","etag":null,"topics":["maze","maze-generator","maze-solver"],"latest_commit_sha":null,"homepage":"https://codebox.net/pages/maze-generator","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codebox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-02T15:13:41.000Z","updated_at":"2023-05-14T15:55:00.000Z","dependencies_parsed_at":"2022-08-27T06:10:23.194Z","dependency_job_id":null,"html_url":"https://github.com/codebox/mazes","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/codebox/mazes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fmazes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fmazes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fmazes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fmazes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebox","download_url":"https://codeload.github.com/codebox/mazes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fmazes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259462577,"owners_count":22861514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["maze","maze-generator","maze-solver"],"created_at":"2025-06-12T12:13:36.655Z","updated_at":"2025-06-12T12:13:37.188Z","avatar_url":"https://github.com/codebox.png","language":"JavaScript","readme":"# Maze Generator\n\nHere is an online [maze generator](https://codebox.net/pages/maze-generator/online) that can create mazes using square,\ntriangular, hexagonal or circular grids:\n\n\u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_square.svg\" alt=\"Maze using a square grid\" width=\"200px\"\u003e \u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_circle.svg\" alt=\"Maze using a circular grid\" width=\"200px\"\u003e \u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_hexagon.svg\" alt=\"Maze using a hexagonal grid\" width=\"200px\"\u003e \u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_triangle.svg\" alt=\"Maze using a triangular grid\" width=\"200px\"\u003e\n\nAs well as creating mazes the generator has many other features, for example it can render a 'distance map',\ncolouring each location in the grid according how far away it is from a selected point:\n\n\u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_square_distance_map.svg\" alt=\"Maze distance map\" width=\"400px\"\u003e\n\nThe generator offers a choice of 10 different algorithms, which each produce mazes with different characteristics.\nAll mazes created by these algorithms are 'perfect' mazes, i.e. there is exactly one path connecting any pair of\nlocations within the grid, and therefore one unique solution to each maze.\n\nIf you want to try solving one of the mazes yourself then you can! The generator lets you navigate through the maze\nusing mouse/keyboard controls, and can automatically move you forward to the next junction in the maze to save you\ntime. Once you finish a maze your time is displayed, together with an 'optimality score' showing how close your\nsolution was to the optimal one. Of course, you can also give up at any point and see where you should have gone:\n\n\u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_playing.png\" alt=\"Maze game in progress\" width=\"300px\"\u003e \u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_solution.png\" alt=\"Maze solution\" width=\"300px\"\u003e\n\nThe generator can either create mazes instantly, or slow down the process so that you can watch the algorithms at work.\nSome algorithms work using a process of trial and error, and can take a long time to finish, whereas others are guaranteed\nto complete quickly:\n\n\u003cvideo controls width=\"300px\" poster=\"https://codebox.net/assets/video/maze-generator/maze_algorithms_poster.png\"\u003e\n    \u003csource src=\"https://codebox.net/assets/video/maze-generator/maze_algorithms.webm\" type=\"video/webm\"\u003e\n    \u003csource src=\"https://codebox.net/assets/video/maze-generator/maze_algorithms.mp4\" type=\"video/mp4\"\u003e\n    \u003csource src=\"https://codebox.net/assets/video/maze-generator/maze_algorithms.ogv\" type=\"video/ogg\"\u003e\n    Sorry, your browser doesn't support embedded videos.\n\u003c/video\u003e\n\nBy creating a mask you can remove cells from the default grids to create interesting shapes:\n\n\u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_square_masked.svg\" alt=\"Maze using a square grid with masking\" width=\"200px\"\u003e \u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_circle_masked.svg\" alt=\"Maze using a circular grid with masking\" width=\"200px\"\u003e \u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_hexagon_masked.svg\" alt=\"Maze using a hexagonal grid with masking\" width=\"200px\"\u003e \u003cimg src=\"https://codebox.net/assets/images/maze-generator/maze_triangle_masked.svg\" alt=\"Maze using a triangular grid with masking\" width=\"200px\"\u003e\n\nNormally the generator creates a completely unique random maze each time you use it, however if you want to play around with a\nparticular maze without changing the layout then just take a note of the 'Seed Value' that is displayed alongside it.\nEntering this value into the 'Seed' input field will make sure you get the same pattern again when you click the 'New Maze' button.\n\nIf you make a maze that you would like to keep you can download your creation as an SVG file,\neither with or without the solution displayed.\n\nMany thanks to Jamis Buck for his excellent book [Mazes for Programmers](http://mazesforprogrammers.com) which taught me\neverything I needed to know to make this.\n\n## Running Locally\nYou can [try out the maze generator online here](https://codebox.net/pages/maze-generator/online). \nIf you want to run your own copy then:\n* Clone the repository, including the 'mazejs' submodule:\n      \n   `git clone --recurse-submodules git@github.com:codebox/mazes.git`\n\n* Go into the 'mazes' directory:\n\n    `cd mazes`\n   \n* Start a web server at this location:\n   \n    `python3 -m http.server` \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebox%2Fmazes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebox%2Fmazes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebox%2Fmazes/lists"}