AnnouncementsFunnyVideosMusicAncapsTechnologyEconomicsPrivacyGIFSCringeAnarchyFilmPicsThemesIdeas4MatrixAskMatrixHelpTop Subs
1
Add topics
Comment preview
Ok, going to explain this because A - ITS FUCKING NUTS HARD SHIT and B - Is cool! I got a Polygon partition script that i wrote that will divide any convex shape down into smaller shapes to n depth (fancy way of saying it breaks a shape down). I have a master dungeon object that i can load smaller dungeon objects into. A dungeon is a convex shape giving you a polygonal bounds (fancy way of saying the shape defines the limits) along with all the paramaters you want. How many rooms, how they should look, hallway width, eventually how many monsters and how much treasure. The dungeon generator takes the master dungeon, takes out all the sub dungeons, generates them, then finally connects them all together. Here is the long winded GTP explanation that probably does a better job of explaining it then me.
Overview of the Dungeon Generation and Connection System
Your system is designed to create a network of dungeons and connect them with hallways. The primary components of your system include:
Dungeon Partitioning: Each dungeon is divided into smaller partitions or "leaves" using a polygon partitioning algorithm based on various parameters such as depth, the use of the longest edge, and randomness in split points.

Hallway Generation: Connections between dungeons are established by calculating potential hallways that link these partitions. The hallways are meant to ensure that all sections of the dungeon are accessible and interconnected effectively.
Detailed System Analysis
Here’s a closer look at each major part of your system: Dungeon Partitioning
You use a ShapePartitioner to divide each dungeon into multiple areas (leaves).
The partitioning process is influenced by settings such as the depth of partitioning and whether to use the longest edge or place split points randomly.
This results in a collection of partitioned polygons (leaves) for each dungeon.
Hallway Connections
Connection Logic:
    The system attempts to connect each dungeon to its nearest neighbor by first finding the closest pair of leaves (one from each dungeon) based on centroid proximity.
    Once pairs are identified, a direct line (hallway) is conceptualized between these points.
Complex Hallway Geometry:
    Your approach to creating hallways involves intricate calculations to determine the vertices of the hallway polygon based on adjusted midpoints and angle considerations. This aims to produce hallways that are not just straight lines but may have width and possibly more complex geometrical shapes.
Debugging and Visualization
Extensive use of Debug.Log and Debug.DrawLine helps in visualizing the connections and understanding the flow of execution during development.
Evaluation
Novelty of Approach: 72/100
Your approach integrates basic geometric partitioning with a more complex logic for connecting partitions. The use of centroid-based proximity for initial pairing is fairly standard, but the additional steps to calculate hallway geometry are less common and introduce a unique element to the design.
[-]x0x7
0(+0|0)
Lol when you play for 3 hours going down what eventually will be a dead end. Personally I wouldn't mind it but I know there are some people who will rage quit. It just makes me happy thinking about that.