Hacker News new | past | comments | ask | show | jobs | submit login
Dungeons Tome – Tool for generating dungeons for RPGs (dungeonstome.com)
289 points by _Zoran_ on Aug 7, 2018 | hide | past | favorite | 102 comments



Very cool!

If you’re into this stuff -this one does cities (make your own Skara Brae): http://fantasycities.watabou.ru

This is one of the Big Dogs: http://donjon.bin.sh/

It does worlds, dungeons, monsters (for different editions of the game), quests, and a ton of other stuff.


As a DM, the #1 tool on my wishlist is a world generator like donjon's, but zoomable (ala google maps) with reasonable procedural generation at levels down to a few meters.

I recognize that this is a significantly challenging task, but hey, if Dwarf Fortress can do it...


This is something I did for our DnD group, the map was created collectively in a photo editing tool and then split up with MapTiler (https://www.maptiler.com/) which generates HTML/CSS/JS you can throw up on a server I have here: http://maps.opendnd.org/ao/. The main issues I found are some skewing from the original map and some pretty bad pixelation when you get to some of the lower levels. That could all be remedied with a better vector graphic for the map -- something to work on in the future.


Wow this is something I never realized I wanted until now. Seems like it could be a cool hackathon project, plus getting to learn more details about how google maps / bing maps / openstreetmap do their zooming.


I’ve played with a bare OSM server before to try and get an osm based map working. Ends up you just have to scrub all the existing geometry and draw it from scratch, but it’s so-able. Worst problem I had was trying to generate realistic height map bit maps.


> http://fantasycities.watabou.ru

This looks very cool! But I noticed something odd: I generated several cities of various sizes and almost every city block is marked as "craftsmen". This can't be right...


Are there any other resources like Medieval Demographics Made Easy (http://www222.pair.com/sjohn/blueroom/demog.htm), mentioned on the donjon site?

The other similar resource I know about is the ancient In the Labyrinth manual for Steve Jackson's The Fantasy Trip.[1]

[1] Jackson recently got back the copyrights for The Fantasy Trip and they have a kickstarter going on now for newly-reissued (and updated, I think) copies.


Thanks for that city generation link. I'm adding that one to my list of DM tools.


Very cool, I especially like that it’s faithful to the DMG. I saw the mention of Donjon, I’ve used the Donjon tools for years and have always loved using them but felt the lack of persistence and interconnectedness was missing.

It’s why I’ve been working on something similar over the past few years and dungeon generating is definitely on the roadmap. It’s called OpenDnD and it’s attempting to be a complete set of open source DM and player tools. The first 5 tools are fairly useable but very much still beta. For those interested, the code’s up on GitHub: https://github.com/opendnd/opendnd.


Cool idea. Starring it to see where it goes.

Maybe I'll even contribute! ;)

Are you planning on adding support for other versions as well (for those features where it matters), or will it just be 5e?


Awesome, contributors would be greatly appreciated :) I'm still working on writing up the main roadmap (it's a very ambitious project) to make it easier for new contributors. Currently, it'll be mostly focused around 5e although I'd love to add support for other editions as well. Especially for things that are highly useful to have support for like character sheets. But I see other things like supporting older versions of the generators described in the DMG will be a bit more difficult to do as it would require more fundamental changes to the code.


I'd like to know, though, are you aware of other Open Source D&D tools that are available?

I had a quick peek on GitHub now, and it brought up: https://github.com/adventurerscodex/adventurerscodex https://github.com/incomingstick/OpenRPG

So, is there any reason to roll your own from scratch rather than contributing to one of the existing projects?

If it's to have your own project that you have complete control over, or if it's just to do something fun yourself, that's totally cool. I'd just like to know.


Great points, I'd be happy to give some background. I originally started working on the project just for our DnD group about 5 years ago. At that time there weren't many other projects available or if so I wasn't aware of them. It was mostly Donjon and a few others that were available and none were built as individual packages that could be composed together and weren't open source. The GitHub org you see now is actually already a merger of existing efforts that were started by other developers who were working on a character sheet generator. The opendnd repo was only started recently as the tools have grown over the years and needed a sort of all-encompassing project.

That being said, I'm aware that other projects are out there now that have similar goals -- some further along than us as it's mostly been me working on it in my free time. However, I would say that our design decision is pretty different from the others in that each component is designed to be a separate standalone tool that can be used as a component to build other things. Because the end goal is so ambitious I think this design decision is critical if the project is ever to get close to achieving that goal. If I had to summarize in one sentence what we're trying to achieve, it's kind of a Dwarf Fortress level of detail but fully open source and fully interconnected components.


Great, thank you for this detailed response! It sounds interesting.

I'll pop you an email and we can continue discussion via a format better suited for this kind of discussion.


Awesome work! One thing I would love to see here would be more examples on what each module generates, since it doesn't really provide those at the moment.


Thank you for the suggestion, I'll add some example outputs. Perhaps something like asciinema may be useful. I used to have some animated gifs of a recorded terminal session but I removed it as so many changes were happening it got outdated fast.


It's fun to poke around with map buildings and world building tools. Here's a great list of map making resources:

https://www.reddit.com/r/mapmaking/wiki/index

And world building resources:

https://www.reddit.com/r/worldbuilding/wiki/reading_list


After examining the rules, there are many flaws. https://www.wizards.com/dnd/files/excerpts/excerpt_dmg4.pdf

The maps don't use any of the optional starting rooms, for starters.

All 45 degree options are missing, as are odd shapes, stairs, pits, etc, resulting in ignoring or heavily modifying Tables II, III, III.B, V.A, V.E, VI, VII, and VIII,.

The rules also specify that the dungeon must start with a stairs entering a room, but it appears that this actually starts with a passage instead, which doesn't appear to require entering a room immediately.

Example: https://www.dungeonstome.com/dungeon/345345345.png The entrance enters the room using a secret door, however there shouldn't be a door between the entrance and the first room.


You're looking at a different version of the DMG :) DungeonsTOME is based on the DMG from 5e.

Although if there was enough interest, I might implement those rules minus the dungeon dressing/encounters and some of the "unusual shapes".


Thanks for the clarification. Could you update the FAQ with a link to the rules?


I don't think the 5e rules are available publicly. If you can find a link somewhere legit (such as wizards.com) then I'll happily put a link up in the FAQ.

As for the older DMG rules that you have, I'll post them up if I end up implementing that version. Otherwise I'll cause confusion :)


There is a System Reference Document for 5e available here: http://dnd.wizards.com/articles/features/systems-reference-d...


Possibly I'm being a bit blind, but I can't seem to find the dungeon creation rules in there?


I am curious as to how this avoids generating overlapping rooms. I actually used this random dungeon generator back in the day, and there was nothing about the algorithm that prevented one room from overlapping another, besides 'DM's Discretion'.

Of course, given how unworkable most of the rest of the DMG was if treated strictly literally, patching the almost entirely unworkable outcomes that result from literal readings of the DMG was pretty much the core Dungeon Master skill.


I am also looking forward to a future release of this, which will populate the rooms based on the rest of the subtables. If I don't see a faithful implementation of "TABLE VIII. C.: MAGIC POOLS" (e.g. roll 16-17 on a D20 and get "Talking pool which will grant 1 wish to characters of its alignment and damage others from 1-20 points.....") I will be gravely disappointed.


The plan is to populate the rooms in the future :)


Iteration, I'd imagine.

1. Generate a pile of random rectangles. This is an additive operation (this is only important for #4, below).

2. Check to see if any overlap. If they do, remove one.

3. Repeat 2 until no more overlap.

4. Check to see if there are too few rooms in the map. If there are, go back to 1.

5. Add corridors (this is a whole 'nother topic).


This is an appealing algorithm; its only flaw is irrelevance to the case at hand. Our original poster is proudly following Appendix A of the venerable 1st Edition Dungeon Master's Guide, which essentially is a breadth-first search with corridors generated 'as we go'. This is not to say that your proposal is worse; just that it fails to capture the early-80s grognard magnificence that the designer appeals to be looking for.


Actually, I resisted making it purely breadth first since it would result in more of a dungeon crawl that a sprawling dungeon. However, I might offer this as an option in the future. It's not a difficult modification to make.


Good question.

Whenever the program goes to place a room or corridor, it firstly checks whether those squares are unoccupied. If not, the room/corridor isn't placed.

I originally made it place the room anyway, since it might result in some interesting structures. But in practice, it just made a complete mess and there was no easy way to decide when to make the algorithm stop.


Good job, but the generator doesn't require a CAPTCHA for me. I click "generate" without filling it out and it works.


Thanks for pointing that out. I've hopefully fixed it now :)


Same.


Went to check it out, and it requires you to jump thru Captcha hoops just to use. I'm not going to spend time clicking on pics training some AI.


The long hallways that don't end in rooms bug me; no one would build a structure like that.


Economic downturn. This stuff happens all the time, just ask your local dungeon developer. Or don't, because those guys are mostly jerks.


The ground might be softer in one direction. There may have been something worth mining out in a specific direction. Of course this only occurs orthogonally in the real world :) The main point is that with mining a tunnel is the natural structure and rooms would be unusual.

An empty hallway is great for storage and requires much less support than building out a room. It could also be explained by venting or similar that might not show up on a map.


"Gettin' ready to carve out the Master Dining Hall and what do we find? It's smack dab against a vein of mithril ore. You know what happens when you start digging mithril, right? We ain't doing that for no union scale!"

I used to work at the old IBM buildings in Austin; there were a few halls that went around a few corners only to dead-end. With a bunch of spare desks and chairs piled against the end wall.


Maybe humans wouldn't, but what about goblins? Orcs? What about dwarves digging exploratory tunnels, or following ore veins?


Maybe its for accessing utilities/maintenance.


Maybe it's an old broken passage.


Yeah, I wasn't entirely happy about these.

The random tables allow a corridor to end in a false or secret door (or stairs, but I stripped those out). So by the same logic, a corridor must be allowed to 'stop' or a dead-end would always mean "trap/secret" to the players.

But as others have said, it's not entirely unrealistic ;)


Well, almost no one. :) Sarah Winchester had such things built, with doors and stairs leading nowhere.

https://en.wikipedia.org/wiki/Winchester_Mystery_House


Ask the people who've been involved with the 2nd Avenue Subway about that...


Very interesting! Any plans to open source the current code?


Probably not. I'm sure I'd cause migraines if people were to see the code ;)

I'd probably open-source it before I abandon it though.


While not as suitable for actually playing tile based RPGs, I am partial to http://orteil.dashnet.org/experiments/dungeongenerator/ for the nice visual design of the generated dungeons.


This is quite cool, do you know what license it's using? Seems to be generating by JS? Could need this



Ha, I was going to ask about Donjon and then found it listed in the FAQ. A fine start. I think it has a way to go to feel competitive with the other dungeon generators (such as Donjon's) out there for me personally, although I guess the focus here is being reasonably faithful to the DMG?


Thanks. Yes, originally I just wanted to use it in my D&D game. Since I couldn't find another generator that used these algorithms, I thought I'd make it available. But I'll probably add some other algorithms in due course.

What features would you like to see?


I like this one, it has more options and also features a JS-based offline version: http://donjon.bin.sh/5e/dungeon/index.cgi


If this isn't open source, I'd have labeled this as a SHOW HN. Also, I'd add that to the FAQ :)


SHOW HN?

I've added the answer to the FAQ :)


If you look at the top of HN there's a "show" link. It's a thing people do here to show off something they have been working on. Not completely necessary, and I don't think you should resubmit -- you already hit the front page.


Ah, cool, thanks :)


I love this! Sooo tempted to spend sometime building something similar with the excuse of learning GOlang!


Ha. I was thinking the same. I've heard lots of good things about Golang :)


I've been asked if I can allow DungeonsTOME to make bigger dungeons.

I'll try to modify it this weekend so allow slightly bigger maximums, and probably to allow you to specify the size of dungeon desired.


I get "Error: You have arrived at this page incorrectly. Try going here." if I click Dungeons TOME in the upper left corner after generating a new dungeon.


Opening this page in another browser it seems that they are loading that Google CAPTCHA widget; maybe your browser is blocking it (as mine did) or you have disabled third-party cookies.

fwiw if a page doesn't load with third-party cookies disabled, it should be considered broken


Good catch, thanks. Hopefully fixed now.


I wish I could add something substantial here, but I just want to say, thank you! I will probably be using this as early as Friday!


yw :)


Very nice, I made one for our D&D group.


Hope it works out well :)


This is exactly the kind of project I could easily sink days and weeks into making; I bet it was fun to write.


It was! :)


You could probably stitch several of the results together for an interesting campaign


I like it. But what really impresses me is how fast the whole site is, even with a captcha.


I stopped playing google's stupid games. Unless I really must visit a site, the first sight of those retarded "discover all" things just makes me close the tab.


I feel like they've gotten worse recently. The past couple times I've done one, they just keep going and going. Today is the first day I've just said fuck it - I don't need to visit this website that badly.


Especially since they're getting free AI training from us.


Isn't that better than generating useless data?


Do you use Gmail or Google search?


I'm experiencing a Flash of unstyled content at every pageload.

I think this could be improved by moving the stylesheet up in the DOM (in the head, and not at the end of the body as it's the case now).


It's not that the CSS is linked at the end of the document but that the CSS is only loaded by Javascript after the document has finished loading.

That's ... unusual to say the least and if I'm honest, the wording "most stupid, brain dead thing I've seen in a long time" was the first thing that crossed my mind.


I can't remember what the logic for that was. I think I was messing around trying to see if I could appease google pagescore on such a tiny page, and eventually I just gave up and left as it was.


Oh, I see now where this is from: https://developers.google.com/speed/docs/insights/OptimizeCS...

That's quite an ugly optimization step. You left out the step where you inline the necessary CSS styles in the head that's why the unstyled page flashes up for a second. But as you use bootstrap, this might be a lot to inline and not worth the effort.

I'd say this is a case where you shouldn't care too much about a highscore :-)


Yeah, I tried inlining it, and it turned out it was going to be a massive amount of CSS :)

Maybe I'll just bite the bullet and do my own CSS.


Thanks. Actually, that's really down to html and nginx. One of the purposes of the site itself was to go back to basics and see whether it was practical to build a respectable looking site without the use of php and big complex templates. I'm glad it seems to have worked.


No adds, no tracking, minimal js and css.


But then again, bootstrap and jquery, which both feel kind of unnecessary today. Bit ironic, that things have gotten so bad on the web that we need to consider this as good.


But both of those, on page load, weight little and are, apparently, all that website needed, not something more Advanced.


It's probably unfair to single this site out, it loads rather fast. Though it requires too much useless js for my taste and little still means 63kb of external files that could probably be ~20kb in a custom stylesheet without loosing much if any functionality and looks.


There's a difference between what's your preference as a programmer and what someone else's is.

Framing it as an absolute where you shouldn't use two tools that make it easier to make a website is unnecessary and makes you look dogmatic rather than wise.

The author obviously had plenty of page weight to spare.


I'm not singling out this site, I am praising it, compared to much of the rest of the web.


Thanks. I toyed with the idea of putting in a custom CSS. As some have said, the site doesn't have big requirements.

BUT, I wanted to have a play with Bootstrap, which I hadn't used before and it was/is comforting to have the ability to expand the look to include other features if I need to :)


Well, it was designed to be executed using dice, pencil, and paper rather than a computer ...!

(IIRC the 1st edn AD&D DM's guide dates to roughly 1982. (Can't find my copy to verify: that's going from memory of when I got mine.))


I don't think parent means the algorithm execution. The whole site just felt very painless to use.


Thanks :)


Captcha doesn't even work. I clicked "Submit" without even touching the Captcha box and it just let me through haha.


Based on a few requests, I've added a key to the dungeon images.


I find the cc-nc license for the generated images surprising[1].

So let me restate that: you take a set of rules from a 30+ year old book, create a graphic from that and claim copyright on the graphic that was derived by those very rules from a random or manually entered seed? Why do you think you have more power over the output than the original author of the DMG?

[1] https://www.dungeonstome.com/faq.html

EDIT: spelling cc-nc


I think you are correct that an image derived from a program with no human input is not copyrightable in the US. Relevant sections from the copyright.gov compendium, 3rd edition

--------------

# 306 The Human Authorship Requirement

The U.S. Copyright Office will register an original work of authorship, provided that the work was created by a human being. The copyright law only protects “the fruits of intellectual labor” that “are founded in the creative powers of the mind.” Trade-Mark Cases, 100 U.S. 82, 94 (1879). Because copyright law is limited to “original intellectual conceptions of the author,” the Office will refuse to register a claim if it determines that a human being did not create the work. Burrow-Giles Lithographic Co. v. Sarony, 111 U.S. 53, 58 (1884). For representative examples of works that do not satisfy this requirement, see Section 313.2 below.

...

# 313.2 Works That Lack Human Authorship

The Office will not register works produced by nature, animals, or plants. Likewise, the Office cannot register a work purportedly created by divine or supernatural beings....

...

Similarly, the Office will not register works produced by a machine or mere mechanical process that operates randomly or automatically without any creative input or intervention from a human author... Example: A claim based on a mechanical weaving process that randomly produces irregular shapes in the fabric...

https://www.copyright.gov/comp3/docs/compendium.pdf (Warning, approx 1200 pages)


That doesn't seem to imply that it cannot be copyrighted.

> Similarly, the Office will not register works produced by a machine or mere mechanical process that operates randomly or automatically without any creative input or intervention from a human author... Example: A claim based on a mechanical weaving process that randomly produces irregular shapes in the fabric...

There is clear direction in the program here; it does not operate randomly without any creative input or intervention from a human author.


Modified version == derived work. Plus it is his own code. Fair game. End of story.


nothing works...


Same here until I realized there is a recaptcha. You would need to accept some frames, cookies, js, xhrs from google.com, and gstatic.com in order to generate a dungeon.


I had to activate JS and go to https://www.dungeonstome.com/generator.html - which then generated https://www.dungeonstome.com/dungeon/1150189360.png for me.


You need a scripting language to prove you are not a robot.


Works fine for me as well




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: