Search Unity

I need help with procedural room generation.

Discussion in 'World Building' started by MysticalYTOfficial, Apr 12, 2022.

  1. MysticalYTOfficial

    MysticalYTOfficial

    Joined:
    Apr 11, 2022
    Posts:
    2
    I’m making a Backrooms Horror game and I don’t know how to make the rooms infinitely generate and I can’t find anything on YouTube. Please help quick.
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    What have you tried and why hasn't it worked?
     
    MysticalYTOfficial likes this.
  3. MysticalYTOfficial

    MysticalYTOfficial

    Joined:
    Apr 11, 2022
    Posts:
    2
    I’ve tried searching up infinite random room generation and all I’ve found were people testing it or it was for unity 2d but I’m making a 3D game. I haven’t found anything with the code
     
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    You're going to have to learn to code for yourself, that's the thing. If all you do is copy from tutorials, you'll never be able to change code to fit your own needs, for instance. Look up how maze generation works or even how Spelunky generated its levels from prebuilt components, then try and figure out how to apply that to 3D. Since the Backrooms, conceptually, all take place on the same plane (no changes in elevation), even 2D implementations will be useful information because you can just assume the floors and ceilings will be at the same height.
     
  5. Hoijima

    Hoijima

    Joined:
    Sep 27, 2018
    Posts:
    2
    I can oly suggest the following if you are interested in tile generation

    - make an array of rooms
    - add exits to them
    - spawn with your favorite algorithm
    - abjust exits using Azimuth

    3D generation is tricky in scope of multilevel, for those you would want to use something like a marching alghoritm with rotation checking