Procedural Generation Level Tool: How it works, and the process behind it
By: Brandon-Lee Mohamed - 991642004
TLDR Features list:
- Create your own Room prefabs
- Make rooms obligatory or not
- Add offset to where the rooms spawn
- Set the size of your grid to determine how large you want your level to be
- Add up to 4 doorways/connection points to your room prefabs.
Design Intentions:
- This tool was designed with level designers in mind as it’s a tool that is meant to be plug-and-play in terms of how it's intended to be used. Users should be able to create prefabs of level chunks or different room types and input them into the generator to create layouts out of their designs so that they can focus more on the level design and less on the tech behind random generation.
- This project was intended to be used for a level design project I am working on where my goal was to create a warframe-style tileset for a level layout, and I created this tool to facilitate the procedural generation aspect of it
- Unfortunately, due to scope, I had to simplify the design aspect of this project and make the tileset more simplified so that I could allocate more time to finishing the programming side of things
Detailed List of features:
- Create your own Room prefabs: This feature allows you to create your own rooms in the Unity Editor and as long as the doorways and walls are identified using the RoomBehaviour.cs Script, it can be used in the Dungeon Generator, and parameters can be added to it when generating your level layout
- Make rooms obligatory or not: Once you input your room prefab into the generator GameObject, one of the parameters you can modify is whether or not it is obligatory in the level generation. If it is not obligatory but is still part of the generator, it has a chance to generate as part of the layout, but if obligatory is checked, then with every layout you generate, it should always spawn as part of it.
- Add offset to where the rooms spawn: This is one of the other parameters that players can modify in the generator script once they’ve added their room prefab. This allows players to add a defined amount of space between that specific room and other rooms in the generator. When an offset value is applied to a room prefab, it applies to any area where it is present in the level layout generation.
- Set your grid size to determine how large you want your level to be: This part of the generator script allows players to define how large they want the grid to be. This defines how much space the algorithm has to find and fill spaces with the room prefabs, so it essentially gives the user control over how large they want the level layout to be.
- Add up to 4 doorways/connection points to your room prefabs: When creating a room prefab, the user must assign the doorways/connection points in the prefab before applying it to the generator script. With this system, the user can create a room prefab with up to 4 connection points as long as they plug in the parameters correctly into the room behaviour script
Summary & Project Goals:
- Create a tool that can be used again in the future for level design-related projects: I believe I met this goal as I am pretty satisfied with where the project is at this point. While it has its constraints that weren’t originally intended, I do believe that with what I currently have, it can definitely be used again to make interesting projects in the future.
- Create a tool that can adapt to different styles of level design layouts: This is a goal I originally had in mind from the beginning of the project, and in some ways, I achieved this, and in some ways, I didn’t. This tool can be used for different genres/styles of level design, but the problem is that the current constraints make it very limited still. I do hope to maybe one day fix it but as of now, it works somewhat like I intended, and I’m still happy with where the tool is now.
- Create a tool that could potentially be used by others: This is a goal that I do think I achieved. For level designers like me, I’d say this tool is straightforward and can definitely be used by others with some explanations however, I do not think this is a tool that is fit for programmers/people who would want to improve and build on it. It’s not very modular code-wise and while it is
Leave a comment
Log in with your itch.io account to leave a comment.