A WIP tool for grabbing tagged maps off of a database and blending them together based on randomly positioned centroids. The next thing I’d like to implement is a UI for moving the centers around and regenerating the landscape based on this.
In the final version of the project(for now) 3d was implemented by storing the height of the last level and making the next room’s height within a small jumpable tolerance.
I also made a few low poly standin meshes for blocks to be iterated, but this is not workable for a realtime level. Either blocks need to be combined to achieve lower draw calls or more likely a pool of larger meshes will need to be instantiated based on wall size. Something to work on the the future, but the algorithm is working now to produce a semi playable level.
My programming graphics project for this semester is an interactive tool for maze/dungeon generation. The initial prototype is built using an iterative python algorithm that adds random rooms to a starting room. Room objects store references to wall and floor positions within a matrix data structure that holds the actual tile objects that compose the rooms. Wall tiles, floor tiles, and terrain tiles. The algorithm is based on a simple description I found online while researching maze generation. When I find the source I will add a citation.
The algorithm works nicely in 2d to generate a series of connected rooms. Using different distributions of room sizes enables control over the form of the maze generated.
To bring the tool into 3d and to utilize the GUI tools in the unity3d engine I am using iron python to execute an adapted version of the generation algorithm. The different tile types are converted to integers at the end of the python function that are parsed by unity after the matrix is returned from the iron python environment to the c# unity code. Each integer is evaluated at an x,y position and a block is instantiated. Below only the wall blocks are instantiated as cubes.
The next steps are creating a user interface in unity to control the distributions of room sizes and the adaptation of the algorithm to create different height spaces. I think a graph may be the correct way to organize the relationships between rooms and their heights to create the appropriate 3d models at those locations.