Hacker News new | past | comments | ask | show | jobs | submit login
Generating Fantasy Maps (2016) (mewo2.com)
175 points by mattrighetti 9 months ago | hide | past | favorite | 25 comments



sigh This is lovely but ...

I used to sit down with a sheet of A3 or A2 and a set of technical drawing pens and a set of writing pens, not to mention the board (Staedtler, with horiz rule and adjustable right angled protractor thingie), French curves, angles, protractor, rulers, compass, flexi curve and the rest.

Obviously, I'd go in with a full set of pencils too. A softly applied, thinly carved 2B to sketch out features first. (etc)

Nowadays I can barely scrawl my name with a Biro, thanks to IT!


Test of artistic talent decades ago: free drawing a perfect circle by hand

today: A legible signature


A valid and relatable viewpoint. I take great satisfaction in keeping my tabletop gaming materials as tangible as possible while many have gone fully digital and never looked back!

That being said, I'm a huge fan of Artifexian's months long video series[0] of scientifically approximate worldbuilding with many different and highly technical digital tools.

Edit: and furthermore, if I were eget back into "hand drawing," I might still prefer an iPad with K. M. Alexander's brush sets. [1]

0. latest episode: https://youtu.be/2RMyd9vo2Qk

1. https://kmalexander.com/free-stuff/fantasy-map-brushes/sampl...


Excellent work. Reminded me of the description in Neal Stephenson's REAMDE about the world generation code that forms the basis of the game:

``` And so, basically as a protest action —almost like an act of civil disobedience against the entire video-game industry — Pluto had put up a website showing off the results of some algorithms that he had coded up for generating imaginary landforms that were up to his standards of realism. Which meant that every nuance of the terrain encoded a 4.5-billion-year simulated history of plate tectonics, atmospheric chemistry, biogenic effects, and erosion. ```


I did this about five years ago, but for a space game I was working on. I wanted to generate solar systems, but I wanted realistic ones. I went down this rabbit hole of learning how solar systems were generated and learned a lot about how statistically speaking solar system formation like ours should be fairly common given the distribution of elements.

Gave up on the game, but this part of the process stuck with me.


Would you be willing to write a blog post or do a code tour or... I dunno, something. This sounds fascinating.


It was years ago so I'd have to refresh myself and my code. I had to make a lot of opinionated decisions that astronomers would probably disagree with.

The approach I took to modeling was to assume relative volumes of each element in the solar system and then assume they would exist in certain frequencies at different distances from the star based on gravity attracting them into the sun and solar winds pushing them away. I used a poisson distribution with the lambda being the distance from the star with highest frequency.

I then ran a clustering algorithm to identify spikes of mass at different distances, and that's where planets would go. I effectively divided the space between two planets in half and gave the elements in each space to each planet. This is one hack I had planned to fix eventually. It should be based more on the mass of the space but I didn't have the energy to do the math on this. Plus, I felt like the clustering I did was a bit of a hack to begin with.

Finally, once I had the elemental composition of each planet, I'd make some big assumptions on how that planet would eventually evolve. I roughly clumped them into earth-like, dead rock, and big gassy thing. For my purposes that was sufficient.

It was doing the distributions that I learned that gas giants like Jupiter tend to be inevitable at about that distance in solar systems since that's about where most loose hydrogen converges to due to its weight.

Hope that's enough to satisfy curiosity. I promise the code is less interesting than this post :)


I'm glad I checked back in. Thank you!


Agreed!


Love seeing this with the code open sourced - also references another great procedural generation tutorial in http://www-cs-students.stanford.edu/~amitp/game-programming/...


Another thing to look at with generated maps like this is to flag areas that would be 'interesting' to humans, to be filled out my a human taking a map of wilderness and adding points of interest.

A fork in a river, a floodplain, a bay, these are all areas where humans would congregate. Not all of them remain viable. Subsequent erosion, attacked by stronger or more mobile tribes (war), supernatural reasons.

A lot of towns are halfway between two places. More affluent towns are halfway between 3-4 places. If one were destroyed by a calamity (natural or magical), then trade along that route would become more uni-directional, possibly desperate.


I do this as well, more or less inspired by a lot of Dwarf Fortress back in the day. I use Wonderdraft to make the map, then spend the rest of my time building a history that took place long before the chronological point in whatever short story I'm writing for it (this is a hobby, I don't publish, but maybe one day when there is more time to develop something an audience would want to read). To me, understanding why there is a town in a particular location, or why a once great city now only holds ghosts of its past is just as important to the story as having a good plot.


Another thing we see all over Europe is people stealing cut stone from older dynasties to build new structures.

If you think about the Great Wall, if not for the continued existence of the Chinese government, a section of that wall would topple, leaving free stones and a ramp up to the “parapets”. People would start hauling away a few stones as cornerstones for buildings, general foundation stones, and maybe stone walls, all depending on how your neighbors feel about seeing evidence of stolen stones (on many simple buildings the foundation stones are hidden, and only family would know). China has also had their own version of the wheelbarrow for ages. You just need a flat enough surface to make a conduit for disintegration.

Don’t build castles in a swamp. Where did they get the stone, and how did they move it? Though in a world with castles and dams, a swamp could form around a castle due to a dam downstream. That could be the result of or result in animosity between neighboring kingdoms, lords.



This is incredible. What a fun interactive demo, as well. I love the way I can copy maps between steps to iterate as I go. Well done!


Reminds me of a bunch of really fun map generators[1] from Watabou (who wrote the classic roguelike Pixel Dungeon[2] too).

1: https://watabou.itch.io/medieval-fantasy-city-generator

2: https://watabou.itch.io/pixel-dungeon


Love this - There have been several fantasy map gen toys in the past, what I really like about this one was the opening passion for the maps in the paperback fantasy novels I read in the 80s - and how the pages still felt and smelled. I loved this maps - I like this tool - its fantastic for achiapeligo maps, and would be cool to import into an Enshrouded like SandBox if that ever is released.

https://i.imgur.com/Fcy8qQl.png

https://i.imgur.com/dPNgvZg.png


Tangential but does anyone have any recommendations for hex map generators? I seem to remember something like this posted on HN but was hex maps.

When I search for them I get grid generators but not maps.


Do you mean something like this by Tamas Rabel?

https://tamas-rabel.github.io/hex_world_generator/hex_world_...


Yes! Thanks!

There was another one that was posted here awhile ago that was different, but this one looks right.


I spend a lot of time thinking about this kind of thing, which is to say proc-genned "lands," dungeons, (cities/towns/villages/hamlets), the eternally Lost Opportunity which has given economic viability to the great and unwholesome Wheel of Pain which is rulechurn for Dungeons and Dragons and so many other properties (probably worthy of some long-form rants thinly disguised as essays).

Imagine yourself playing a character in a simulation, walking through across a harsh desert plain. No sand, no hard-pack soil crazed with cracks, just weathered rocks and eternal wind. The horse has died some time back and only ominous constitution checks have kept you propelled across this near-featureless vista. A rock at your feet is interesting enough, but you discover it has three sides aside from its bottom. Does this startle you out of your gameplay? Most people would say, "Hey, it's a rock." But if you're a geologist, and especially a student of ventifacts, you might recognize the dreikanter, a three-sided rock so formed by wind. Is the simulation so good that it produced this kind of rock purely from repeated applications of The Math?

Or you might come across a cave system. You ready your weapons, and for what? Why, an encounter. Now, in actual spelunking, what you want at hand is rope, not a sword, because most dwellers in caves tend to look like little white shrimp, tiny translucent spiders, patches of a very thin fungus, or eyeless fish little more than water themselves. Caves just don't support a lot of life, at least, not for permanent dwellers, and yet we have our monster hotels. Fortunately DMs have, chastened by the term, at least stopped stuffing some lonely red dragon in a cave where it can't ever actually leave.

Now, it's easy enough to say that we expect a kind of exaggerated reality out of our games and our maps, and it's almost true, but it isn't sufficient. Our expectations include these odd little rocks, too. Sure, we expect our mountains to be taller and our gorges deeper, our volcanos hot enough to melt the One Ring, much less tungsten (a block of which would simply indignantly sink without melting once it punched through the caldera's crust leaving behind poor Gollum). However, we expect even our exaggerated variations to vary, so we can't simply apply some multiplicative function across the whole of our heightmap like a lazy creator. No, we must have relatively staid areas, as well. More normal. Bearable. And then it is back to having unlikely geological features in a little much abundance.

Just as we have had some posts on "random" when it comes to musical playlists not actually being random, we want something out of our fantasy maps which isn't quite reality, but in a way which is almost ineffably fanciful.


Someone needs to make a utility to export legends maps and stories in Dwarf Fortress. It is a complete world with lots and lots of NPCs ready made.


Super fun to play with!


Really well done, this is so fun to play with.


Great work




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: