I forgot rule one of doing procgen screenshots...
... make everything rainbow coloured as soon as you can.
#procgen #citygeneration #proceduralooh this is very intriguing!
Thanks. Its a system I've been tinkering with for a while. Next step will be to add roads of varying thicknesses and growing the city over time.
i'd be curious to know how your waterways work! i like that they're multiscale. are they on their own grid, separate from the visible one? (if you don't feel like going into details, no obligation at all.)
They are indeed separate to the grid of the city block. A lot of this requires me using ClipperLib to build paths to cut out of a landmass, so all the rivers are really negative space in said landmass right now (is fine... Not dealing with real hills or height levels here. I'll fake that later)
Rivers are given a start point and strength, and an end point and strength, and a chaos rating, and carve their way across the map, and the path is midpoint displaced (value based on their chaos)
This continues until each of their segments is (at the moment) about 10 meters long, and the nodes are assigned their current strength, lerping along the river from the start to the end. At the moment everything is just lines.
After all the rivers have their ideal paths drawn, they're all checked for intersections
Any river that intersects is checked from the closest nodes; the stronger river gets a new node at that intersection that has two parents and continues down the stronger path. The rest of the weaker one is culld
To make it more apparent a river merged, the stronger river also inherits the strength of the weaker river at that intersection and passes them all down the chain, so rivers get nice and bulky the more tributaries that flow into them
Then once all intersecting rivers are found, from each node put a point representing the bank at that point on each side, as far out as their strength. Then that forms the path of the river that gets carved out of the map.
I also have coastlines the rivers immediately stop at and the last few nodes multiply in strength to represent a river mouth reaching the sea. After some massaging to inflate the shapes a little, Clipper carves it all out of my landmasses, and the city blocks eventually get plotted atop those
(the coastlines are also neat... they're also a midpoint displacement, but along a really long wavelength sawtooth so that it looks like longshore drift. They cut out everything between them and the side of the map they're a coast for)
this is really interesting, thank you for sharing! i like that this is all made of geometry and interactions between geometry.
it's been great seeing this grow.
clipper sounds like it's for slicing / performing boolean operations on geometry? it looks neat to work with for procedural generation!
May 7, 2025 14:52this approach to rivers is really interesting to me because it starts with independent pieces of geometry and then 'finds' a riverlike structure in them. i like that a lot. it seems like it works really well!