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

how to make procedural-generated infinite worlds?

Discussion in 'World Building' started by ferrarijames51, Mar 15, 2020.

  1. ferrarijames51

    ferrarijames51

    Joined:
    Nov 24, 2019
    Posts:
    4
    How exactly would I go about making a procedural-generated infinite world in the same vain as Minecraft? Are there any store assets designed to do this? Because I've seen plenty for procedural terrain generation but not much for endless world-space generation.

    Is there anything out there I could use to populate the generated landscape with npcs or creatures? What about anything for dungeon/cave or settlement generation?
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    If you google "procedural generation" you will find lots of information about it. It's a big topic.

    But the basic idea is simple: you divide the world into chunks, and you use a repeatable generation algorithm (e.g. based on Perlin noise) to generate chunks that are guaranteed to mesh neatly with neighboring chunks. Then you just generate these on an as-needed basis as the player moves around.
     
  3. ferrarijames51

    ferrarijames51

    Joined:
    Nov 24, 2019
    Posts:
    4
    Oh cool! I believe I've heard more about that as well. Are there any good assets anywhere that can help with this? I'm aware of stuff like Gaia, but I'm not sure of anything that helps with procedural noise generation.
     
  4. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Basically you need to learn how to spatial hash, how to translate those hash in unique random number, then use that to seed a generator using layered paramters.
     
  5. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Or you could get Map Magic on the Asset Store (V2 out soon) and if you need a Minecraft type world team it up with Voxeland. Also there are a number of voxel terrain generators on the Asset store, and quite a few free on GitHub.