A downloadable asset pack

Package description on Crayta forum:

https://forum.crayta.com/t/procedural-tools-maze-dungeon-terrain-generation-buil...

EGS Name: nns2009

Contributors: Just me

Package Name: Procedural Tools (Maze - Dungeon - Terrain generation)

Package Description

Procedural Tools is a flexible and extendable package, which lets you procedurally generate random mazes, dungeons and terrains.

Procedural Tools is organized in a composable manner: different parts of generation are handled by separate scripts, instead of everything being handled by a single script (monolithic architecture). This way you can choose any combination of scripts for each part. For example, you can choose to combine backtracking maze generation with voxel rendering or DSU maze generation with template rendering. And you can even easily make your own implementation of the necessary part for further customization.

Quick start

A little downside of this, is that it might be simple to forget to add all necessary scripts, which the main script depends upon. The easiest way to start using “Procedural Tools” is to:

  • Drag-and-drop one of 8 sample templates which come with a package, into the world
  • break the template link and
  • proceed customizing it from there

Detailed guide

Dependencies have to be attached to the same entity

Grid Generation System

depends upon:

  • Grid generation algorithm and
  • Grid rendering script

Grid generation algorithms

There are four premade grid generation algorithms (which, again, are interchangeable):

  • Backtracking Maze Generator
  • DSU Maze Generator
  • Star Maze Generator
  • Binary Division Dungeon Generator

See the flexibility? Maze generation and dungeon generation are interchangeable and main script (Grid Generation System) doesn’t need to know anything about implementation details - it just needs something that generates grid.

Grid rendering scripts

There are two premade grid rendering scripts:

  • Voxel Grid Rendering
  • Template Rendering

Template Rendering

is the easier one. You just provide template assets for floor, wall and ceiling and it works. There is a big downside though. Crayta doesn’t support scaling, so you’ll have to make sure all of these templates are of appropriate sizes. There is no option to scale them with this script.

Voxel Grid Rendering

further depends on having floor, wall and ceiling voxel renderers. For all three (floor, wall and ceiling) you can use the provided Uniform Voxel Renderer. For a bit more customization and an example of alternative implementation, for walls you might use Skirt Voxel Wall Renderer.

Both Uniform Voxel Renderer and Skirt Voxel Wall Renderer depend upon VoxelTools.

Terrain Generator

is equally composable. Terrain generator depends upon:

  • Noise provider (there is one provided with the package - Perlin Noise Octaves, which in turn depends on Perlin Noise 2D)
  • Column filler (there is one provided with the package - Layered Column Filler, which in turn depends on Voxel Tools)

There are then optional modifiers which Terrain Generator can accept:

  • Value transformer (one provided is - Polynomial Value Transformer)
  • Falloff transformer (two provided are - Circle Falloff and Edge Falloff)

Leave a comment

Log in with itch.io to leave a comment.