Unity Dungeon Generator is a Procedural Generation for dungeon creation. It will result a bunch of data for your needs.
Unity Dungeon Generator using Delaunay library from https://github.com/jceipek/Unity-delaunay, it is MIT License. In this project, the Delaunay already included.
There is 2 Algorithm in this package
- Spreads Rooms automatically (for creating rooms) x Delaunay Triangulation (for connection each room)
- Binary Space Partition (for creating rooms) x Delaunay Triangulation (for connection each room)
Which one is better?
IMO, the first one is the best. It will create natural looking dungeon.
How to use it?
Spreads Rooms automatically x Delaunay Triangulation
- Create Empty GameObject, add Dungeon Rooms Generator Component and Delaunay Dungeon Generator.
- Setup the value in inspector, for starter, this is my recommendation.
- Click the Complete Actions, it will automatically create the data for you dungeon.
Binary Space Partition x Delaunay Triangulation
- Create Empty GameObject, add BSP Dungeon Generation Component.
- Setup the value in inspector, for starter, this is my recommendation. (Value option for Room Counts until Spread Distance is ignored, it only used when using spreads rooms)
- Click the Generate, it will automatically create the data for you dungeon.
You can implements the dungeon using rooms and corridors variable from DungeonGenerator.cs. Spreads Rooms automatically x Delaunay Triangulation will not using rooms, but mainRooms variable from DelaunayDungeonGenerator.cs. You can see TilemapBSPDriver.cs for how to implements it.
It is MIT License. But if you create a game with this script, shoutout on your social account really appreciate!!