Publisher | Denki Gaka |
---|---|
File size | 405.01MB |
Number of files | 90 |
Latest version | 1 |
Latest release date | 2021-04-21 04:02:15 |
First release date | 2021-04-21 04:02:15 |
Supported Unity versions | 2018.4.2 or higher |
Maze Magic is a new class script you can add to your project to facilitate creating randomized, procedurally generated, hex-based mazes at runtime. Maze Magic will create a hex grid of any size you choose, create the number of variably sized rooms you desire, and then create a network of paths to join them together. After creating the maze, it runs a smoothing algorithm on the walls to create a maze with more organic and natural looking edges.
The Maze Magic Class is loaded with documentation and the members and methods are placed alphabetically in the script files to make it easier to find things when working in Visual Studio. I have also added IntelliSense entries for everything to make your life easier. The variables are divided into groups based on their access modifiers, and all the exposed public variables include Unity Editor tool tips to help you keep track of what goes where.
I have included five example level art styles in a prefab for you to use; however, you can easily replace any or all of them with your own artwork. You also are not limited to five different level types, you can use only one or as many as you care to. The class can easily adjust to however many level types you need. You can easily reskin the included base wall model with your own textures, or use it as a guide as you create additional 3D elements, as I did with the trees in the forest example. Although I just used variations of the same tree in my example, the prefab uses individual models, so it is entirely possible to use different items for each wall shape: Full Hex, Rectangular Wall, Half Hex, Point Filler, and Distorted Pentagon.
Maze Magic works seamlessly with Unity's NavMesh system and can automatically create a walkable NavMesh surface for you after every map generation event. However, it is not necessary to include the Higher Level NavMesh Components Package to use Maze Magic, but the demo is more full featured if you do. To install the NavMesh package you will need Git Desktop installed on your computer. Then simply follow the instructions in the included PDF to install NavMesh.
PLEASE NOTE: Maze Magic imports as a complete project by default. This will overwrite any existing project settings and set your project to use the Universal Render Pipeline. It is recommended to import it into an empty project; however, it is possible to add it to an existing project without overwriting your current project settings. When warned about it overwriting your project settings, go ahead and click "ok." On the next pop up it will ask whether to "Install/Upgrade" the project dependencies. Answer "Skip" to prevent any undesired packages from being added to your project. The final step to prevent overwriting any project settings occurs once the import dialog opens. Scroll to the bottom and uncheck the check box next to "Project Settings." After that it is safe to continue importing everything else. Then you can change the shader on all of the materials in the "Maze Magic\MM_Assets\Materials" folder, except the ones with "skybox" in the name.