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

Help with developing a dungeon

Discussion in 'Game Design' started by OneProGoober, Jun 18, 2016.

  1. OneProGoober

    OneProGoober

    Joined:
    May 11, 2016
    Posts:
    50
    In particular, I want to generate random dungeons with all rectangular shaped rooms (but in case I change my mind will it be possible to generate other shapes too later on?)

    I'm just dipping my feet into the water here to start learning what I need to know for a game I want to start working on soon, and am wondering if cellular automata is the right approach to take, or should I try something else?

    Thanks!
     
  2. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    What are your objectives for your dungeons?

    For instance, are they first and foremost themed spaces for your mechanics to work in? Or is it more important that they convey some aesthetic or feeling for the player? Are they spaces that further the narrative, or is the narrative separate from the dungeons?

    a helpful link
     
  3. OneProGoober

    OneProGoober

    Joined:
    May 11, 2016
    Posts:
    50
    Thanks for that link. Yeah - it's more of a space for my game mechanics to work in. I just want a pretty simple procedural dungeon mechanic. Might just do square rooms for now until I feel like I can tackle something a bit more advanced on my own. I'm aiming for less detail on the environment and focusing mostly on gameplay and learning new things since it's really one of my first works anyway.
     
  4. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    Well, you just need a bunch of dirty room models.

    In game development, you need to convey a certain way the player should feel. In a dungeon, the player should probably be curious and scared. Try to get some assets like this: https://www.assetstore.unity3d.com/en/#!/content/33936

    You probably want a lot of dirty, dark rooms connected by a long, dark corridor. Also don't forget the audio, a random cry from a madman and general creepy ambient noise will really help scare the s**t out of the player :)
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,521
    That's a smart way to approach it, since it gets you up and running and testing your mechanics quickest. Maybe use one gray-boxed square room prefab with doorways north, south, east, and west, and just drop them next to each other in a grid. You can always swap it out with a more sophisticated algorithm and fancier graphics later. A lot of us fall into the trap of focusing on one bit of tech, such as procedural dungeon generation, too early in prototyping. We burn a lot of time developing a sophisticated generator without keeping the big picture in mind. Then when we drop in the gameplay mechanics and find that it's just not fun, we've lost all that time. We can try to rationalize it ("well, at least I learned something about procedural generation"), but the fact is we still don't have a fun prototype after all that time.
     
  6. capnjake

    capnjake

    Joined:
    Nov 12, 2013
    Posts:
    53
    I'd love to drop in Cat Like Coding and particularly this link: http://catlikecoding.com/unity/tutorials/maze/

    Looks like it has all the functionality you are asking for right now aside from the potential for room shape customization (see other tutorials for more). I would highly recommend.
     
  7. Marrt

    Marrt

    Joined:
    Feb 7, 2012
    Posts:
    612
    I posted my random dungeon scripts here, they create a Tile-Dungeon on a grid.

    http://forum.unity3d.com/threads/random-level-generator.342587/

    Tile is an enum and can have values like "Tile.Floor" "Tile.Wall" "Tile.None" etc.

    I use the RoomTemplateDungeon currently, i also improved it but i didn't update the post. If you find it useful, maybe i upload the new version too, changes to the available one:
    -RoomTemplates can be red from textures
    -dungeons can have entrances at the border for better transistions
    -mirror/rotation functions
    -better programming practice, the generation-function now returns the dungeon rather than updating static variables which have to be red manually, what was i thinking?
     
    Aiursrage2k likes this.
  8. dturtle1

    dturtle1

    Joined:
    Jun 7, 2016
    Posts:
    24
    I recommend Cat Like Coding as well. I am half way thru the Hex Map Tutorial, its pretty cool and there is lots of stuff to learn about. I plan on turning it into a procedural world builder like Endless Legend/Civ5. Got a feeling that is going to be harder than it sounds :)
     
  9. qqqbbb

    qqqbbb

    Joined:
    Jan 13, 2016
    Posts:
    113
  10. the_Bad_Brad

    the_Bad_Brad

    Joined:
    Nov 2, 2014
    Posts:
    278
    What I do is play some games related to my project style. I'm now working on a castle game and so I've been playing Skyrim just to get inspirations. I suggest you take a look at some good dungeon renders out there and try to mix their designs into yours to create unique art.
     
    Ryiah likes this.