dungeon builder 3: some help would be appreciated

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

dungeon builder 3: some help would be appreciated

Post by wolph42 »

I'm quite done with the core engine of the DB3. Its however 'quite' done. It works and is useful, but sometimes does stuff that I can't explain within the current code. These are loose ends, corridors that pass through other rooms (which should not happen) or corridors that end just before the other room.
Usually everything goes well and with the extra 'connect sections'code I get a full working dungeon, but it would be useful if it really works as it should.

I'm now gonna see how im going to get the DB2 tiles working for DB3 which is separate from the DB3 engine as it now is.

Hence the request: can anyone have a look at the current DB3 and see where it goes wrong?

link: https://www.dropbox.com/s/go6t0n3ie2nzi ... cmpgn?dl=0

it aint a pretty sight and its certainly not UF. In principle there are 3 core functions (later to be connected)
1. create rooms. This one works perfectly.
2. create corridors. These connect the rooms and works nearly perfect but has that weird thing i can't find
3. connect sections, final check if everything is connected and if not: more corridors (basically calls 2 again).

all the functions store their stuff on the lib (properties are defined. Explanation can be found in çreate rooms' function.

The two functions with which '2' works are: checkCoord() (checks for corner, wall, edge, nothing) and nextCoord() which is the recursive function that actually builds the corridors.

thank you for looking. Ask away if stuff is unclear.


User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: dungeon builder 3: some help would be appreciated

Post by aliasmask »

I would have chimed in but it seems like a fairly complicated problem that would need some dedicated time. One thought I did have was to place your rooms then run corridors off of each side and if it runs in to another room or another corridor then to mark that point. You end up with a pathing system with set lengths where you can find the shortest path. This method will also always connect a room to a corridor or another room.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: dungeon builder 3: some help would be appreciated

Post by wolph42 »

aliasmask wrote:I would have chimed in but it seems like a fairly complicated problem that would need some dedicated time. One thought I did have was to place your rooms then run corridors off of each side and if it runs in to another room or another corridor then to mark that point. You end up with a pathing system with set lengths where you can find the shortest path. This method will also always connect a room to a corridor or another room.
well since my 'integrate with DB2' went bust I focused on this issue again. For one I found an easier debug method, that helps A LOT (on the run printing of corridors). I've already picked out one error and I've just found the second one: json.difference not working as I want it to (you know the discussion) initially I though that only a certain case would not work because of this, but I just found out that this REALLY screws things up big time. hence im now going to move everything to the MT test build where the new function is available and continue from there.

So wait with this request until I'm stuck once more.

Post Reply

Return to “Macros”