I'm creating a fantasy-world generator. So far I've got it generating a reasonably good surface map, complete with terrain, cities, and borders. Here's a link for anybody who wants to try it: https://drive.google.com/open?id=0Bxgb9V1OuYfpUFdmOWRxb2VrOGM. This is a super early build, but still feedback is appreciated! The basic program workflow is:

  1. Generate height map (mountain ranges, coastlines)

  2. Generate Terrain from Height Map. For the surface, this involves placing forests, wilderness, fields, swamps, etc, in places that would make sense given the mountains/oceans.

  3. Generate provinces, cities, and kingdoms based around the generated geography.

I have this working pretty well for the surface-world, but one thing I want to do is expand the map downwards to include an Underdark-like world below. The methodology I have for making the height-map is all good, but I'm at a bit of a loss over what types of terrain/biomes to use to fill in this underworld. In terms of geography, it will contain a maze of wide-open caverns, with large underground lakes. There will be points here and there where this connects with the surface-world and travel/trade is possible. To give you an impression of the scale I'm talking about, the underworld would line up exactly with the map generated in the example above, the underground lakes would be roughly the same size as the surface ones, and the caverns would be 3-8 “blocks” wide (1 block = 1 small coastal island). One thing we cannot do is have holes in the "roof" to let the sunlight in below. This is due to technical limitations of the program that I don't want to deal with.

Some of the caves will obviously just be bare rock, but if civilizations are to live/thrive down here they'll need more than just rock. This underworld will mostly be populated by dwarves and goblins (I may add an even lower level full of daemons, but they don't really apply here).

Presumably they need some sort of “fertile” terrain similar to the farms on the surface, from which their civilizations would emerge and expand. Maybe mushrooms fields/forests could work? I know mushrooms get energy from existing biomatter, but maybe I can say that these get their energy from geothermal heat. Maybe then they could grow alongside lava flows the same way fields/forests grow along rivers? Any other ideas? They'll definitely be fishing the underground lakes, so maybe some kind of fish-farming next to the waters? Any other ideas for food-sources that could create the surpluses needed to build a civilization, or other underground terrain types that would look cool from a top-down strategic view?

I'm not looking for total realism here, just some believably and internal consistency. Thanks!

  • $\begingroup$ It would be unlikely that mushrooms can somehow live without consuming other life forms - better than changing that have a lot of chemo-autotroph bacteria that the mushrooms can live of (you might also want to think of a carbon source for this ecosystem, maybe fossils?) Actually an eco system living of fossils would be pretty cool - though it would be predestined to collapse at some point $\endgroup$
    – Nicolai
    Commented Jun 15, 2017 at 9:32
  • $\begingroup$ Forests (sometimes) grow alongside rivers because it's a source of water. The river flowing also brings silt from upstream which is fertile for soil. Lava flows aren't a replacement for water, though you DO have underground lakes and this would have rivers. Without light, though, you'd have a hard time getting plants to grow... $\endgroup$ Commented Jun 15, 2017 at 11:25
  • $\begingroup$ Age of Wonders (III I think?) has some interesting underground biomes that might serve as inspiration! fungal forests, lava plains, lakes, rivers and the like. As an aside is there any chance you would be willing to make the source code available? Or require help? (I've worked on a few Unity projects and this one sounds interesting!) $\endgroup$
    – Firelight
    Commented Jun 15, 2017 at 11:31
  • $\begingroup$ Mushrooms don't really provide caloric density, which is connected to them growing in resource/energy poor environments. They ARE important for breaking down matter into soil, though. $\endgroup$ Commented Jun 15, 2017 at 11:39
  • $\begingroup$ @Firelight Thanks, but I'm keeping this to just me for the time being as that's how I'm most productive. Might bring on some more folks in the long run though. Thinking about starting up a Patreon or something too (though that also complicates adding more folks to the team)... Lots of possibilities! $\endgroup$ Commented Jun 15, 2017 at 17:13

4 Answers 4


The first thing to do is figure out what sort of analogues we are looking for in an underground terrain. From there we can discuss how different environmental factors might interact to create that terrain

  • Deserts: low precipitation, fairly barren environments (sounds like the default for underground caverns). Sand and dunes are frequently featured (bigger "ask"). Lots of mostly smaller animals operating "in cycle" with the environment to avoid environmental hazards.

  • Forests: multistory plant life as larger plants loom over smaller ones. Fertile soil and highly active biome due to lots of plants. Lots of plant competition for sunlight/energy (interesting...). Lots of animals that interact vertically with the environment, taking advantage of height for defense as well as attack.

  • Mountains: large changes in elevation creating notable geological features. Rugged terrain and rapid atmospheric change makes traversal difficult. Also notable is the concept of a tree line: large plants can only grow up to a certain altitude. Lots of highly mobile animals adapted to dealing with rough terrain and reduced food supply.

  • Plains: broad, fairly flat terrain with a lot of short plant growth. Often a "transitional" type between two other terrain types. Lots of "fast" animals to run over flat land, slower animals generally operating in packs for defense.

There are others, but these four tend to be considered the basic "types." I chose my wording carefully for these to provide for our underground analogues. Notice that plants and how they interact with the environment are generally at the core of how we define our biomes. Let's focus next on the energy and resources that will form the core of our biomes.

  • Light: not really much direct light underground, so the only sunlight would exist at surface caves. Bioluminescence is an option, so chemotrophic lichen and fungus would use the glow to attract mobile animals to help it spread (be releasing seeds/spores/pollen onto the animal). There may be some photosynthetic plants growing toward the lichen in response, but it's... unlikely. Absent a strong light source, lot of creatures would use alternate means of sensing their environments - either infra-red vision or echolocation.
  • Water: while you won't really have the normal precipitation based rain cycle, there are still a number of sources for underground water.
    1. A surface river could divert into a cave and give us an underground river - a very dynamic environment.
    2. Cracks in the rock above lets water drip through the ceiling, forming stalactites in normal cave formations. Expect relatively still pools.
    3. Related to 2, you could have large tree roots breaking into subsurface caves, bringing water along with it. These potentially would be very diverse areas, with the existing biomass of the tree roots forming the base of the environmental web as life "suckles" at the roots of the tree. Sentient creatures might even craft religious imagery centered around life giving tree roots.
    4. Aquifers would exist as deep underwater lakes and, potentially, threaten settlements built near semi-permeable rocks with flooding if the stone wall cracks.
    5. Steam - your geothermal processes at work provide both heat and humidity. Hypothetically, you could also have light in the picture if the steam is provided by a body of water trickling into an open, glowing lava flow.
  • Heat: as mentioned above, this would be readily available once you get deep enough or close enough to a geothermal source. Interestingly enough, cool dark cave closer to the surface might be an analogue to a wasteland without access to water or an energy source...

Which brings us back to our four terrain types.

  1. Deserts = Barrens: the cool and dry caves are resource poor, arid areas not well suited for life.
    • Traversal of these barren caves and labyrinthine passages connecting them would be avoided until necessary.
    • Lifeforms present would exist more at the fringes of the biome itself (where some plants thrive) and much of the internal food web would be based upon predation. Where water does intrude, you'd see the "oasis effect" clustering around the water source.
    • Why cross the desert? Primarily because of trade - getting to the surface in many cases would require crossing the barrens, since travelling up the subsurface rivers would be nearly impossible. Going from one underground settlement to another might require passing through a barrens as a natural barrier to settlement expansion.
  2. Forests = ... forests. Really.
    • You wouldn't have "trees," but consider a deep geothermal cave with the "floor" of the forest as the actual ceiling
    • plants will scramble and compete for heat and moisture, trying to get as close as possible to the source, but biologically limited
    • roots can only be so strong, so there's a limit to how "tall" they can be before pumping moisture up to the roots becomes impossible (just like trees)
    • Living things don't really like being burned and boiled, so there's a natural limit to how close to the magma or steam vent a plant can get.
    • Like a jungle flipped upside down, animals would travel along the ceiling or jump from trunk to trunk, nesting in the root systems of the larger plants and nurtured by the water condensing on their "leaves." You could even have subterranean "monkeys" brachiating across vines and flying "birds" nesting in the canopy.
  3. Mountains = sinkholes - deep, treacherous terrain with specially adapted life.
    • Basically think of a cone-shaped mountain... and invert it, flipping it upside-down with the "tip" as the deepest point.
    • Where the wall slopes are shallow, you'd have forests and habitations.
    • The steeper the slope of the walls and deeper the sinkhole, the harder it is for creatures to live there. You'd have "goats" scaling cliff faces and agile "wildcats" hunting them.
    • For the biggest/deepest caves you'd have magma pools at the antapex (fun new word!). The fumes and dry heat creates a comparable if inverted barren environment to surface mountains, requiring special gear and bottled air in order to travel that far.
  4. Plains = mushroom/lichen marsh.
    • The moist environment near subsurface rivers could have a build up of real soil/silt from upstream
    • This rich substrate and extensive moisture throughout would potentially grow mats of mushrooms and plant life.
    • Something like enoki mushrooms - filamental and tall - could substitute for grass that smaller creatures would hide in. Other forms of "brush" could also be involved.
    • This would be a broad, flat cave that would regularly see flooding, much like the area surrounding the Nile river. This would also be a prime location for sentient creatures to farm in.

Environmental Interplay

Now that we've established what our environments are, we can talk about how geographically they connect and transition.

  1. Rivers - surrounding areas are fertile marshland. Perfect for any settlement, but probably inhabited by something culturally hobbit-like. Probably the main culture to engage in interaction with the surface through passages carved upriver.
  2. Tree root complexes - the underside of an ancient forest. This is where you'd find tree-worshiping subterranean elves carefully cultivating the plant growth. Probably the likeliest home for bioluminescent algae/lichen as well. Elves would be averse to fire (destructive to their habitat) and would prize plant/woodcraft from the sacred roots over metalwork.
  3. Sinkhole ranges - "mountainous" regions where the higher slopes could support plant and animal life might be an ideal place for dwarven cultures carving caves into the slopes. Focus on forging and foraging.
  4. Barrens and labyrinth - a series of caves and passages connecting different rivers together. A potentially harsh environment that's home to hunters building their camps around oases. Might be an ideal region for archtypical goblins wielding rock based weapons and leather armor (from prey). Would "raid" connected fertile environments.
  5. Steam caves - water interacting with geothermal sources, rivers flowing from marshland into deeper areas will lead to these "upside down jungles." You might see various civilizations intruding into these areas, but limited by the availability of usable ground to build on. Detrius falling from the upper layers of the cave to the floor would be moist, fertile soil if anyone were willing to risk collecting it.
  6. Magma caves - expect a fairly hot and dry and therefore barren environment, though you could still have aboriginal style nomadic cultures.
  7. Oil reservoirs - not really capable of supporting life, but potentially an interesting geologically barren feature - a "liquid desert" quite important to any civilization capable of tapping into this natural resource.
  8. Stillwater lakes - Overall cold and resource poor areas for land dwellers, you'd have underwater food webs in a sufficiently large lake that would be exploited/fished by the other cultures for food.
  • 1
    $\begingroup$ Thinking about the "treetops" in the underground jungle, if you had a solid cap (like an upside down mushroom) then falling detrius would collect on the "underside" of the canopy and eventually rip the tree free of it's roots. It's likely that the natural adaptation to that hazard would be spreading branches with fan-like foliage that allowed material to fall through but still provided support for living animals to climb along the branches. $\endgroup$ Commented Jun 15, 2017 at 22:24

Guano fields


There are cave systems on earth with entire ecosystems that are based on the energy extracted from bat droppings. Bats fly out of the cave at night, feast on the insects above ground, return to the cave and poop out the remains. The guano is very rich stuff, full of energy and nutrients. It's fed on by insects, which in turn are prey for amphibians, and on and on.

For your purposes, you could almost treat piles of bat guano like waterholes, with oases of life built up around them.

Hydrothermal vents

This actually reminds me a lot of a question I asked about feeding a city built around hot springs in a polar desert. I think for your purposes, you could use the information about chemosynthetic bacteria in hot springs.

Add a geothermal area with hot, chemical-rich water welling up from underground. The water would be host to colonies of bacteria, which in turn would be eaten by filter feeders like molluscs and tube worms. You'd have a situation akin to a deep-water hydrothermal vent or black smoker, with the same potential for life.

Ultimately, it seems that the most important factors for life on earth are liquid water, and a source of energy. These two are often the same factor. As long as you've got those, you can generally justify some kind of life.


You need some kind of energy source for life to exist. I think geothermal energy would be the coolest: you have geothermal vents like those at the bottom of the ocean that are surrounded by thermophiles (https://en.wikipedia.org/wiki/Hydrothermal_vent for more info on this).

Alternatively to get around the "no holes in the roof", could there possibly be constructs from an extinct civilization that channel sunlight? Once those are in you can have plant life and from there various cave creatures.

  • $\begingroup$ There are certain crystals that act like glass. I could imagine some forming the roof of the cave with no dirt on the top surface for "reasons" (steep slope, high wind, water...) allowing light to filter through into the cave system. I suspect it would look amazing, too. $\endgroup$ Commented Jun 15, 2017 at 16:13
  • 1
    $\begingroup$ That took too long to find. Ulexite and probably its related minerals. $\endgroup$ Commented Jun 15, 2017 at 16:26

An underdark is always funny and challanging.

I can imagine several options for "underground farming" as you called it. Some where already mentioned so i won't repeat them ( like hydrothermal vents ).

  • Live is completely carnivore/insectoid. That is, insects eat dung from higher life forms, they grow more insects to consume. And they consume others that live in the deep. Not to mention guys from above that get lost underground (insect farming)
  • There is some form of magical light source in a big cave. Think of a sun-like orb of radiation or an ancient hyper-tech "lightbulb" that spends enough energy to sustain plant growth. This may or may not need to be charged with actual sunlight from time to time. Or permanent portals that are opened in front of the sun so there is a permanent flow of light. I also like the idea of giant glass-tubes delivering sunlight from the surface to farmers and cities. You could have a complete jungle underground, although I would not see the necessarity since you could just have a jungle on the surface lol (normal farming)
  • Life forms don't need to sustain like surface dwellers. "Somebody must have dug all these tunnels". Maybe somebody did. Maybe somebody ate it's way through the earth, like a giant stone dragon. And the folks living there are it's descendents. Like stone-kobolds. And they can digest some or all stones. ("stone-farming"? giant roots from trees?)
  • Underground may be partially or completely underwater. This way fresh nutrients and fish can be washed inside the cave-system and creatures living there could find enough food to survive. (fish-farming, shells)
  • Go all-out fantasy and have the whole planet be hollow with an artificial sun hovering in it's center. Archmage GibGob always had a fable for the sun and tried to capture it for many years until he made his own. Also possible with nuclear-fusion powerplants that produce electricity, depending whether you go magic-fantasy or tech-fantasy (normal farming)
  • There is only as much life underground as surface dwellers bring down there. That means, under each major elf-forrest, dwarfen mountain or human city sewers, there is life, and these are "islands" of life in a cave system of stone and darkness. (no farming at all)
  • There could have been a giant "world-tree" and after it's death it's deep ranging roots rotted away, giving space for the civilisation underground. Mushrooms and other plants could be grown from the remains of the roots

EDIT: sorry for my weird writings, I kind of got carried away but won't change it now that i posted it


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .