Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Assets [WIP] 3D Dungeon Generator

Discussion in 'Works In Progress - Archive' started by eDmitriy, Sep 14, 2019.

?

Will you buy this asset?

  1. Yes <10 USD

    100.0%
  2. Yes < 20 USD

    0 vote(s)
    0.0%
  3. Yes < 30 USD

    0 vote(s)
    0.0%
  4. No

    0 vote(s)
    0.0%
  1. eDmitriy

    eDmitriy

    Joined:
    Aug 22, 2013
    Posts:
    13
    Hello, everybody!
    I am working on a dungeon generator for my game and want to share the current results. I would like to hear tips on how to improve and speed up the editing process, expand flexibility.



    So, what this thing is and how it works.
    There are 4 key concepts - grid, cell, path and block:
    • Generation is based on a 3D grid formed from cells with a large step (10 meters in the video), but you can always limit the height if you want.
    • A path is a chain of connected cells that form a dungeon path. There are many ways to create and edit path.
    • A block is an object of arbitrary shape, the shape of which is voxelized (it seems to me that this is the closest term) to a cell format. It should have 1-2 main connections and an unlimited number of secondary ones.
      It can be a simple element of the corridor formed by one cell or a huge multi-storey throne room with many exits and consisting of hundreds of cells. And it can placed manually.




    When we finished editing the dungeon path and are satisfied with the result, the next stage begins - scanning path for fitting blocks.
    • The script scans the path and compares with the existing blocks.
    • If all the cells of the block fit, as key that fits the lock, the block will spawn on the appropriate place.
    • Scanning continues from inserted block end cell and etc.


     
    owlhowell likes this.