View Full Version : Random Dungeons: The Next Generation
07-30-2006, 11:54 PM
I've been giving some thought to writing a program that produces a CC3 script with Jamis Buck's Random Dungeon algorithms (http://www.aarg.net/~minam/dungeon_design.html), but I'm divided on how to go about it. Should I write my own code from scratch based on the algorithms described on the above webpage,
use his JBMaze class for steps I and II and my own code for the rest, or
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 (http://www.aarg.net/~minam/downloads/dungeon_src.zip) to download the relevant source code.)
Dalton "who's caught between laziness and the urge to tinker" Spence
07-31-2006, 08:19 AM
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...
08-01-2006, 11:58 AM
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.
12-07-2006, 04:29 PM
Those of you who have been following the Maze Generation Code (http://www.cartographersguild.com/forum/viewtopic.php?t=149) thread are aware I've actually written macros to handle step I of the procedure. (http://www.aarg.net/~minam/dungeon_design.html#I) I have also written some macros for handling step II (Maze Sparcification and Deadend Removal) (http://www.aarg.net/~minam/dungeon_design.html#II) 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." (http://www.aarg.net/~minam/dungeon_design.html#III) 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
12-07-2006, 04:49 PM
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.
12-07-2006, 08:06 PM
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
12-10-2006, 01:22 AM
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
12-10-2006, 03:00 AM
I think you are going in the right direction.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.