gradient, an elevation lapse rate, and rain shadow approximated by a running maximum of elevation along the wind, so deserts end up behind mountains because the moisture rained out on the windward side and so on.
Drainage is D8 flow accumulation with depression-filled lakes and rivers extracted at the 98th percentile of accumulation.
Then Voronoi regions (nearest-seed kd-tree), macro-region clustering, and feature extraction that finds mountain passes and chokepoints, the strategic sites history will later care about.
And it now does care. The military layer reads geography when it picks wars (weighting how hard a target is to attack), scores which regions are worth taking, and routes raiders by path difficulty, so an unreachable target nearly drops off the map. The pass the feature extractor found gets to matter to a war declared two hundred simulated years later.
Political map and borders with traderoutes
# Economies that cascade
Production chains are declared in JSON (`ore → ingot → tools`), settlements consume from regional resource pools and write back to them. A small registry of cascade rules then routes upstream events to downstream consequences on a delay.
I'm currently reading a lot about the Bronze Age, and the Bronze Age collaps is such an interesting event that gave me some inspiration.
A major metal-goods crisis knocks a settlement's defense down a notch and, two years later, a second rule turns that weakened defense into banditry: a `bandit_pressure` condition that then raises ambush odds for caravans crossing the region. So a mine running thin in one decade becomes raiders on a trade road in the next, with no event scripted between them. Because each consequence traces to exactly one rule, I can read a finished world back and explain why a road is dangerous, not guess. The prices in the player-facing shop just read post-tick economic state and tag goods scarce or surplus on their own.
Resources, and Trade
# Gods that earn it
Inspired by Indo-European pantheon and its history, religion follows the same instinct: don't hand out importance, let the world generate it. Fifteen primordial concepts (fire, forge, death, war, nature) are universal archetypes, not gods; each culture filters them through its own experience, so the same concept becomes different deities, or none, depending on who's worshipping.
Unanswered prayers tick up on their own, so a god whose culture declines slides from major deity back toward local spirit. Gods don't usually die dramatically here. They're forgotten.
Religious system
# Learnings so far
Data-driven authoring is the multiplier: every system I made JSON-authorable paid for itself within a week; every one I hardcoded got rewritten.
Constraints beat randomness: the most believable output came from the most constrained systems, not the freest (arguably).
Wiring is harder than generation: building a drainage simulator is a fun weekend, but making a war care about a mountain pass is months, and that's the part that makes a world feel caused instead of decorated.
The dungeon generator that started all this is still in there, now sitting inside a procedurally-shaped continent, inside a settlement, inside a history that can account for it.
Techstack: Python 3.10, NumPy, NetworkX, pytest, scipy.
# General references that taught me most
\- Shaker, Togelius, Nelson, *Procedural Content Generation in Games* (2016), the survey http://pcgbook.com/
\- Red Blob Games (Amit Patel): https://www.redblobgames.com/ , practical reference for everything map-shaped.
\- Martin O'Leary, "Generating fantasy maps":
Drainage is D8 flow accumulation with depression-filled lakes and rivers extracted at the 98th percentile of accumulation.
Then Voronoi regions (nearest-seed kd-tree), macro-region clustering, and feature extraction that finds mountain passes and chokepoints, the strategic sites history will later care about.
And it now does care. The military layer reads geography when it picks wars (weighting how hard a target is to attack), scores which regions are worth taking, and routes raiders by path difficulty, so an unreachable target nearly drops off the map. The pass the feature extractor found gets to matter to a war declared two hundred simulated years later.
Political map and borders with traderoutes
# Economies that cascade
Production chains are declared in JSON (`ore → ingot → tools`), settlements consume from regional resource pools and write back to them. A small registry of cascade rules then routes upstream events to downstream consequences on a delay.
I'm currently reading a lot about the Bronze Age, and the Bronze Age collaps is such an interesting event that gave me some inspiration.
A major metal-goods crisis knocks a settlement's defense down a notch and, two years later, a second rule turns that weakened defense into banditry: a `bandit_pressure` condition that then raises ambush odds for caravans crossing the region. So a mine running thin in one decade becomes raiders on a trade road in the next, with no event scripted between them. Because each consequence traces to exactly one rule, I can read a finished world back and explain why a road is dangerous, not guess. The prices in the player-facing shop just read post-tick economic state and tag goods scarce or surplus on their own.
Resources, and Trade
# Gods that earn it
Inspired by Indo-European pantheon and its history, religion follows the same instinct: don't hand out importance, let the world generate it. Fifteen primordial concepts (fire, forge, death, war, nature) are universal archetypes, not gods; each culture filters them through its own experience, so the same concept becomes different deities, or none, depending on who's worshipping.
Unanswered prayers tick up on their own, so a god whose culture declines slides from major deity back toward local spirit. Gods don't usually die dramatically here. They're forgotten.
Religious system
# Learnings so far
Data-driven authoring is the multiplier: every system I made JSON-authorable paid for itself within a week; every one I hardcoded got rewritten.
Constraints beat randomness: the most believable output came from the most constrained systems, not the freest (arguably).
Wiring is harder than generation: building a drainage simulator is a fun weekend, but making a war care about a mountain pass is months, and that's the part that makes a world feel caused instead of decorated.
The dungeon generator that started all this is still in there, now sitting inside a procedurally-shaped continent, inside a settlement, inside a history that can account for it.
Techstack: Python 3.10, NumPy, NetworkX, pytest, scipy.
# General references that taught me most
\- Shaker, Togelius, Nelson, *Procedural Content Generation in Games* (2016), the survey http://pcgbook.com/
\- Red Blob Games (Amit Patel): https://www.redblobgames.com/ , practical reference for everything map-shaped.
\- Martin O'Leary, "Generating fantasy maps":
https://web.archive.org/web/20240516225320/https://mewo2.com/notes/terrain/
\- Emergent simulation, Tarn Addam talks and Brian Bucklew "Data-Driven Engines of Qud and Sproggiwood"
\- Inigo Quilez: https://iquilezles.org/articles/ , noise, SDF, fBm.
https://redd.it/1u9i2vz
@proceduralgeneration
\- Emergent simulation, Tarn Addam talks and Brian Bucklew "Data-Driven Engines of Qud and Sproggiwood"
\- Inigo Quilez: https://iquilezles.org/articles/ , noise, SDF, fBm.
https://redd.it/1u9i2vz
@proceduralgeneration
web.archive.org
Generating fantasy maps
An interactive exploration of the map generation algorithm behind
@unchartedatlas.
@unchartedatlas.
I have some ideas for procedurally generating games that anyone can use.
1. Accurate backrooms generation game that generates just like the real backrooms in the Kane parson’s series.
2. A voxel game with infinite planets and galaxies, you can design things out of pixels like the chisels and bits mod or out of normal blocks, but each new planet has a chance of generating new atoms, elements, ores, and new plant life.
3. Some game like The powder toy but you can mix and fuse elements to make new things. Mainly focusing on the nuclear/atomic aspect.
If anyone would want to pick these ideas up and make them into a game, or inspire your own idea, you can do just that, no credit needed and these ideas are free to use
https://redd.it/1uabpr9
@proceduralgeneration
1. Accurate backrooms generation game that generates just like the real backrooms in the Kane parson’s series.
2. A voxel game with infinite planets and galaxies, you can design things out of pixels like the chisels and bits mod or out of normal blocks, but each new planet has a chance of generating new atoms, elements, ores, and new plant life.
3. Some game like The powder toy but you can mix and fuse elements to make new things. Mainly focusing on the nuclear/atomic aspect.
If anyone would want to pick these ideas up and make them into a game, or inspire your own idea, you can do just that, no credit needed and these ideas are free to use
https://redd.it/1uabpr9
@proceduralgeneration
Reddit
From the proceduralgeneration community on Reddit
Explore this post and more from the proceduralgeneration community
How Do You Know Which Mathematical Functions to Use for Procedural Texturing?
Hi everyone,
I recently started learning about procedural texturing, and I'm a bit confused about the creative process behind it.
When you have a specific texture in mind, how do you know which mathematical functions to use to create it?
I'm trying to understand how you go from "I want this texture" to "these are the mathematical building blocks I should use."
Thanks!
https://redd.it/1uaenqr
@proceduralgeneration
Hi everyone,
I recently started learning about procedural texturing, and I'm a bit confused about the creative process behind it.
When you have a specific texture in mind, how do you know which mathematical functions to use to create it?
I'm trying to understand how you go from "I want this texture" to "these are the mathematical building blocks I should use."
Thanks!
https://redd.it/1uaenqr
@proceduralgeneration
Reddit
From the proceduralgeneration community on Reddit
Explore this post and more from the proceduralgeneration community
What to do with bad algorithm generations?
Main path generated by the algorithm
Hello there!
I recently started working on procedural generation algorithm, based on this generator, but with some changes:
\- Start and end room have special, slightly random spawn location
\- The rest of rooms are placed randomly
\- System generates main path first (start room, through one special room to exit room)
\- I will add other rooms / hallways later
For now I got working algorithm, I scripted automatic test to generate dungeon 100 times and count whenever is complete and I got 70 - 80% success rate.
But there is a problem I wonder about - How to handle this 20 - 30% of bad generations? should I try to repair them or just throw it away and generate it once more time? But if so, I will need to change the seed, that means that seed is not able to generate anything complete? How it's handled in popular games?
https://redd.it/1uarlnr
@proceduralgeneration
Main path generated by the algorithm
Hello there!
I recently started working on procedural generation algorithm, based on this generator, but with some changes:
\- Start and end room have special, slightly random spawn location
\- The rest of rooms are placed randomly
\- System generates main path first (start room, through one special room to exit room)
\- I will add other rooms / hallways later
For now I got working algorithm, I scripted automatic test to generate dungeon 100 times and count whenever is complete and I got 70 - 80% success rate.
But there is a problem I wonder about - How to handle this 20 - 30% of bad generations? should I try to repair them or just throw it away and generate it once more time? But if so, I will need to change the seed, that means that seed is not able to generate anything complete? How it's handled in popular games?
https://redd.it/1uarlnr
@proceduralgeneration
Any ideas on how to generate river net on this flat terrain
https://preview.redd.it/spsr449nvf8h1.png?width=1875&format=png&auto=webp&s=73e359213e53f0ea91637005314f6b27777b68ad
I am amateur in the field and would really appreciate some advice
https://redd.it/1uawx0b
@proceduralgeneration
https://preview.redd.it/spsr449nvf8h1.png?width=1875&format=png&auto=webp&s=73e359213e53f0ea91637005314f6b27777b68ad
I am amateur in the field and would really appreciate some advice
https://redd.it/1uawx0b
@proceduralgeneration
This media is not supported in your browser
VIEW IN TELEGRAM
Video game RL environment with procedural base generation / attack design
https://redd.it/1ub2cth
@proceduralgeneration
https://redd.it/1ub2cth
@proceduralgeneration