Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Procedural Generation

Discussion in 'Scripting' started by GameDevGary, Feb 8, 2015.

  1. GameDevGary

    GameDevGary

    Joined:
    Apr 15, 2014
    Posts:
    12
    Hey y'all, as you can see, I've rigged up a simple arbitrary "world generator" using some for loops. What I'm really looking for though, is some kind of node based system, or an algorithm, a reference, whatever, to get me facing in the right direction. I want to be able to create a grid, and Instantiate game objects in that grid. The system should be able to create a path, check if there's anything in a given node in the grid and determine whether or not, and what to create in that spot...

    That's a little specific, but I'm just asking for someone to point me in the right direction, or briefly explain to me how procedural generation like this works. I'm not looking for someone to give me some code, or do it for me, I'd just like a little nudge of knowledge. Thank you for your time.

    Edit: Any advice and/or input is wanted and welcomed.
     

    Attached Files:

    Last edited: Feb 8, 2015
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Have you checked out catlike coding? Some good procedural generation stuff there to get you started.
     
  3. GameDevGary

    GameDevGary

    Joined:
    Apr 15, 2014
    Posts:
    12
    I just did, that's some really great stuff, thank you so much. Do you think this is a good method for doing this, a large area, made of several small pieces? Couldn't this get messy after a while and cause performance issues? What's your opinion?
     
    Last edited: Feb 8, 2015
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    ...

    I have no real experience with this. My knowledge of procedural generation ends with "try catlike coding".
     
  5. GameDevGary

    GameDevGary

    Joined:
    Apr 15, 2014
    Posts:
    12

    Ah. I see. Well, thank you for pointing me there. He has some really cool stuff.