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

Procedural Level Generation

Discussion in 'Scripting' started by gonzosmemoirs, Sep 29, 2014.

  1. gonzosmemoirs

    gonzosmemoirs

    Joined:
    Sep 16, 2014
    Posts:
    5
    I know a million questions are asked on very similar topics, but I can't really find what I'm looking for. Maybe I am searching incorrectly. I am very new to procedural generation and want to try to make one.

    I want to make something similar to the Binding of Isaac. I am simply in love with the way that the levels are generated. Very simple and straight forward. However, I want to achieve this in 3D instead of 2D.

    I imagine that most of the rooms are premade. Boss rooms, arcade rooms, regular rooms, rooms with gaps, rooms with rocks, etc. I am wondering where I can get a good tutorial on this so I can wrap my head around how it's being done and then expand on that.

    In my head, the generation might look something like this:

    Any advice would be helpful. Ideally, I would want to make a similar mini-map as well (after the level is created, I am sure this part would be easy).

     
    Last edited: Sep 30, 2014
  2. gonzosmemoirs

    gonzosmemoirs

    Joined:
    Sep 16, 2014
    Posts:
    5
    Nobody? Everyone says that there are 'tons' of procedural generation tutorials out there, but I can't find one that suites my needs. Am I searching incorrectly?
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    cannot see that image..
    ( http://answers.unity3d.com/storage/temp/33082-selection_006.png )

    i'd check first those couple procedural dungeon generator assets (somewhere in the forums),
    they make 3D procedural dungeon (had some rooms there connected with corridors i think)

    if its not suitable,
    could just place "empty room" placeholders in a 3D grid,
    then instantiate the actual rooms in their places randomly..
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
  5. gonzosmemoirs

    gonzosmemoirs

    Joined:
    Sep 16, 2014
    Posts:
    5
    I appreciate the responses guys. I've actually read all 3 of those gamasutra articles. I'm looking for something that really breaks it down. I'm a PHP programmer. So I'm new to C+ and still getting used to developing in Unity.
     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    The algorithms are the same, even if the language is different. DanielSnd contributed his Unity C# code here. Here's another tutorial in Unity C#, and another in JavaScript, and tons of examples in the Procedural Content Generation wiki. BTW, if you like DanielSnd's code, consider buying his COOP Action Game Kit which uses it.
     
  7. MisterMatt

    MisterMatt

    Joined:
    Oct 24, 2012
    Posts:
    13
    I am working on a procedural generated 3d world and none of the tutorials fit my needs either. Go through them all. You will get bits and pieces to understand how to build it the way you envision it. I finally have a unique solution to my problem, but so far it has been a few months (still optimizing it) of coding every day after work and combining that with several years of professional (non game) development experience.

    Good luck and you can never soak up too much knowledge!