Results 1 to 8 of 8

Thread: Random Dungeons: The Next Generation

  1. #1
    Guild Apprentice
    Join Date
    Jun 2006
    Location
    Hamilton, Ontario, CANADA
    Posts
    47

    Post Random Dungeons: The Next Generation

    I've been giving some thought to writing a program that produces a CC3 script with Jamis Buck's Random Dungeon algorithms, but I'm divided on how to go about it. Should I
    1. write my own code from scratch based on the algorithms described on the above webpage,
    2. use his JBMaze class for steps I and II and my own code for the rest, or
    3. just adapt his JBDungeonpaint class to output a script file from his JBDungeon object?
    What would be the pros and cons of each? (Click here to download the relevant source code.)

    --

    Dalton "who's caught between laziness and the urge to tinker" Spence

  2. #2
    Administrator Facebook Connected Robbie's Avatar
    Join Date
    Mar 2006
    Location
    Dayton, OH
    Posts
    3,868
    Blog Entries
    6

    Post

    This interests me greatly...And I may be able to contribute some wisdom, but give me some time to dig up and think on it a bit...
    All Hail FlappyMap! Long Live MapFeed!

    Robbie Powell - Site Admin

  3. #3
    Administrator Facebook Connected Robbie's Avatar
    Join Date
    Mar 2006
    Location
    Dayton, OH
    Posts
    3,868
    Blog Entries
    6

    Post

    Ok...after reading a bit...it appears he's basing his algorithms off of the depth first search model of maze generation and generating a maze from that and then converting it into a dungeon with some other smartness. I never got past the maze part because I didn't really need to.

    I have some source code lying around somewhere though that is visual basic code that generates mazes based on three different maze algorithms. Depth first search, kruskal, and prim. It does this in screen saver format, so if you'd like this source code (vb6 I think) let me know.
    All Hail FlappyMap! Long Live MapFeed!

    Robbie Powell - Site Admin

  4. #4
    Guild Apprentice
    Join Date
    Jun 2006
    Location
    Hamilton, Ontario, CANADA
    Posts
    47

    Post

    Those of you who have been following the Maze Generation Code thread are aware I've actually written macros to handle step I of the procedure. I have also written some macros for handling step II (Maze Sparcification and Deadend Removal) but haven't tested them yet, since they require an input macro I have yet to write.

    The biggest challenge for me is step III: "Room Generation and Placement." While it should be possible to write macros to do this randomly, any approach that I've come up with using the stated algorithm would take a very long time to execute and require extensive use of data-holding temporary hotspots. This has led me to ask the question, "Is this trip really necessary?" This IS a mapping program after all; wouldn't it be more logical for the map maker to place the rooms manually in a way that made sense for the adventure, rather than wait a very long time for the computer to come up with a random selection that would probably have to be editted anyway? Simply placing rooms where desired would need a much simpler macro, even if random door placement is included. Any opinions on this?

    One thing that I definitely won't try is room contents; none of the algorithms I've seen for that seem to factor in room size (the only reason I can see for including it in the mapping process anyway), so you can get a two square room with a ton of treasure, several elves and a dragon while a forty square room can be completely empty. However, what I could do is link a hotspot over each room to launch a text file that could contain such a list. Should I include this in the room drawing macro?

    --

    Dalton "who needs a little direction here" Spence

  5. #5
    Community Leader RPMiller's Avatar
    Join Date
    Apr 2006
    Location
    Watching you from in here
    Posts
    3,226

    Post

    Auto room generation would be a nice feature, but not a deal breaker. For me just having a rectangle, circle, whatever tossed in and the walls of the maze trimmed away would be enough I think so after generation editing seems like the most practical way to go.

  6. #6
    Guild Apprentice
    Join Date
    Jun 2006
    Location
    Hamilton, Ontario, CANADA
    Posts
    47

    Post

    I'm going to stick with rectangular rooms to start with. Much easier to code, at least until a "Select by Polygon" mode is created.

    --

    Dalton "who still has a lo of work to do here" Spence

  7. #7
    Guild Apprentice
    Join Date
    Jun 2006
    Location
    Hamilton, Ontario, CANADA
    Posts
    47

    Post

    Okay, I've got the room drawing macro mostly done, but I'm sort of stuck on door placement. The main issue is the same; random chance vs. intelligent design. (No, this isn't a religious debate. ) At the moment I'm leaning toward the latter with an element of the former; door placement will be deliberate but door type can be (optionally?) randomized. I'm waiting until the DD3 Art Upgrade comes out on Monday so I can see my door options.

    --

    Dalton "who hopes he'll have something to post here by Christmas" Spence

  8. #8
    Community Leader RPMiller's Avatar
    Join Date
    Apr 2006
    Location
    Watching you from in here
    Posts
    3,226

    Post

    I think you are going in the right direction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •