Newbie tries making a fantasy city generator

@KVogler: I’d absolutely love getting a look under the hood of that if you’ll allow me. My approach to learning more advanced stuff so far has been to track down blueprints that sort of do what I want, and try to reverse engineer them. “Ahh…so when that goes in there, it does this…!”-kinda thing. It’s served me well so far, at least for the not-too-complicated stuff. I’ve saved the entire series of pics you just put up - I wanna recreate it while trying to figure out what makes it tick step for step. It’s pretty close to the one I’ve done in some regards, but I definitely see some things done smarter in yours. Also, thanks a lot for that stream-link, that looks really good! Will watch it right now.

Anyway. I pulled KVogler’s lovely blueprint apart and added some pieces from my own previous version. That allowed me to get rid of my janky “rotate a mesh with a socket on it”-version of getting coordinates for my spline points, and finally got a way to make sure the points never cross. I think I’ll be calling the basic spline generation done now. Thanks so much for the hints. :smiley:

Next point of order for me should probably be to spawn a bunch of those circles, within a set distance from each other, and spawn connecting “roads” between them, as per my original plan:

So one way would be this:

  • Find a way to find the shortest path between the points of two seperate splines.
  • Autogenerate a spline between those two closest points.
  • Repeat until all the spawned polygons are connected.
  • And probably add a bit of random so more than one road can be spawned between polygons.
  • And probably some way of handling intersections. Can’t have a city without 4-way crossings.

Or, if I figure out how, since I sort of prefer this in my head:

  • Spawn polygons right next to each other and make them connect together somehow. I’d want it so if one is warped by randomization, the adjacent one inherits that randomization in the edges where they meet.
  • Make a system where I can spawn any desired number of polygons (within reason) that autoconnects in the above way. Maybe if I make them all pentagons or hexagons and have them spawn in sort of interconnected grid, that I then add randomization to…somehow…