Cave Generation Tool

Information

  • Team Size: Solo Project
  • Role: Full Tool Development
  • Time Frame: 8 Weeks
  • Engine: UE5 (C++)
  • Grade Achieved: 79%

Cave Generation Tool

The purpose of this tool is to solve the problem of creating a cave like structure and environment in Unreal Engine 5. This tool will automate the process of creation of a cave structures by using procedural generation whilst also allowing for other features such as a structure seed, random corridor and room generation, whilst also having a detailed layout of custom settings to allow users to customise the output of this tool to their exact liking.

This tool was made using UE5 C++ (for efficiency) and uses a custom cellular automata system, inspired by 'Conway's Game Of Life', to fill outa 2D cave grid. This grid has a vast array of customisable features in order to ensure that it is a complete tool giving the user as much freedom as possible to make a cave generation of their choice.

Features

  • Grid Seed: Specifies the seed value for generating the grid. If set to 0, a random seed will be generated.
  • Seed Lock: Determines whether the seed is locked or not. If true, the generator will use the provided seed value, if false a random seed will be generated.
  • Grid Scale Z: Sets the scale for the grid along the Z-axis, determining the height of the generated grid.
  • Cell Spacing X: Sets the spacing between cells along the X-axis.
  • Cell Spacing Y: Sets the spacing between cells along the Y-axis.
  • Fill Probability: Determines the initial fill probability of each cell being filled (alive).
  • Number of Iterations: Specifies the number of times the cellular automata rules are applied to modify the grid.
  • Empty Neighbour Threshold: If a cell has fewer than this number of neighbours that are alive, it becomes empty.
  • Fill Neighbour Threshold: If an empty cell has this number or more neighbours that are alive, it becomes alive.
  • Number of Corridors: Specifies the total number of corridors that will be generated.
  • Corridor Length Min: Sets the minimum length of the generated corridors.
  • Corridor Length Max: Sets the maximum length of the generated corridors.
  • Corridor Thickness: Determines the thickness of the corridors. For diagonal corridors, the thickness will be increased by 1.
  • Allow Straight Corridors: Allows the generation of straight corridors in the grid.
  • Allow Diagonal Corridors: Allows the generation of diagonal corridors in the grid.
  • Allow Room Spawning: Determines whether rooms should be generated or not.
  • Number of Rooms: Specifies the number of rooms to be generated.
  • Room Size Minimum: Defines the minimum size of each generated room.
  • Room Size Maximum: Defines the maximum size of each generated room.
  • Allow Room Loot: Determines whether loot should be spawned inside the rooms.
  • Loot Height: Specifies the height at which loot should be spawned inside the rooms.
  • Room Loot: Defines the type of object to be spawned inside the rooms.
  • Grid Mesh: Specifies the static mesh that is used for each grid cell.
  • Grid Material: Sets the material to be applied to each cell in the grid.

Technical Design Document