procedural generation
127 subscribers
5.36K photos
1.8K videos
7 files
11.4K links
Created by @r_channels
Download Telegram
Keeping short-seed world gen from getting repetitive

I'm building Altworld, a browser-based life sim where players describe a world in a sentence and the game builds a persistent setting from that. I keep hitting the same wall: short seeds produce very similar results. A one-line medieval prompt almost always gives a village with a tavern, a blacksmith, and a forest nearby.

I've tweaked the prompt to push for more variation, but the fix is brittle. It either breaks coherence or loops back to the same few templates. Has anyone solved the problem of keeping procgen diverse when the input is this sparse? I'm curious how others inject controlled randomness without losing the thread of the setting.

https://redd.it/1u8p9ma
@proceduralgeneration
Procedural real-world cities in pure Python: Real footprints → grammar-generated buildings → drivable in Godot engine
https://redd.it/1u95069
@proceduralgeneration
This media is not supported in your browser
VIEW IN TELEGRAM
Every shape here is a procedural point cloud. The brain is ~800 particles, and harvesting a memory morphs the cloud into its sigil. No art assets, all SkiaSharp. (Memory Dealer)

https://redd.it/1u9g79y
@proceduralgeneration
From Procedural Dungeon Generator to Plausible World Simulation (writeup + sources)

Six months ago I've started a procedural dungeon generator that answered the question "what could be here". Quickly I got fixated on a different one, "why is this here?", and it quietly reorganized the whole project around itself.

I got a bit carried away. Here is a generated map of the whole continent that includes countless generated dungeons:

https://preview.redd.it/ck15zxpoj38h1.png?width=1768&format=png&auto=webp&s=cab32842e63adb82c0212d24a91e64a697dc68fd



This is a writeup of how that one constraint played out across five subsystems, with a sources section at the end for anyone building something similar.

But first things first.

# Rooms that need reasons

The dungeon is a NetworkX graph (rooms are nodes, doors are edges), but the interesting part isn't the graph, it's that every room has to justify its neighbours. Each room type declares what it provides and what it requires:

"forge": {

"provides": "smithing", "metalwork",

"requires": {

"watersource": {"maxdistance": 2, "required": true},

"orestorage": {"maxdistance": 3, "required": true}

}

}"forge": {

"provides": "smithing", "metalwork",

"requires": {

"watersource": {"maxdistance": 2, "required": true},

"orestorage": {"maxdistance": 3, "required": true}

}

}

Generation runs in two passes. First, pick rooms from the dungeon's archetype and the owning culture's needs. Then run constraint propagation: for every placed room, consult `max_distance` looking for something that satisfies each requirement, and auto-insert it if nothing does.

A forge that needs water within two rooms gets a well nearby. Cultures inherit room palettes and topology preferences (depth, branching, symmetry, secret-passage chance) from parent cultures, so a dwarven forge-clan stronghold and an elven sanctuary come out structurally different. Nothing is placed without a reason it could be defended in-world.

Procedurally but restraint defined dungeon map with plausible layout \(and incursions, i.e cave-ins, floodings..\)


That was meant to be the entire project. Then I wanted the dungeons to belong somewhere, and the somewhere needed a history. And language.

# Languages that remember

Each language has a phonotactic profile (which sounds exist, which clusters are legal, how syllables build) and that profile, not the vocabulary, is what makes elvish sound elvish (I am using high fantasy language placeholders for now).

On top sits a sound-shift engine modelled on real diachronic processes (lenition, vowel shifts, final devoicing, a Grimm's-Law-style rotation), so words mutate over centuries and every name keeps its etymology. Languages also drift apart by divergence against a Swadesh core list (words/concepts/ideas that every culture reasonably can name) at a rate set by remaining contact: civil-war splits diverge fast, trade-bonded neighbours stay intelligible and so on.

Over a long run you get dialect forks, the occasional trade pidgin, and low-prestige languages dying out. Honest caveat: these are placeholder *phonologies* tuned to real-world aesthetics, no grammar yet, what's really simulated is the evolution of name-generating rules, enough that a city's name tells you which century and dialect shaped it.

How the engine changes existing vocabularies




# Geography that causes history

The world used to be a hand-authored JSON map, which meant every playthrough ran on the same continent. Replacing it is a 14-stage pipeline, and the throughline is the same: start with physics, derive everything else.

A simplex-noise heightmap (multi-octave fBm, edge falloff for continent shape) was my choice. Climate falls out of it: a latitude
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":
web app for designing parametric wave walls
https://redd.it/1u9l5pw
@proceduralgeneration
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
Godot 4 PBF File reader gd script only early
https://redd.it/1uae8sp
@proceduralgeneration