How Stuff Works: Web-based Random City Generator
I made an update to the Free, Web-based Random City Generator today. Here’s a summary of what changed:
- The number of layers of images was cut by more than a third. I felt like it was loading slowly (and it probably still is) so I made a change to the way the low-med-high groups of images were composed. (More below.)
- Fixed a bug where an extra image was getting added in some cases.
- Changed it so that if two or more sections are combined, they no longer are all given the same density.
- Also the outer section doesn’t have to have the same density as the matching inner section. (But the other section won’t have a higher density than the matching inner section.
- Fixed another bug where setting the join to “all” was not respected.
So let me explain how the tool works and maybe the points above will make more sense. The city was built as a multi-layered image in GIMP. (A semi-professional image editor.) The city has separate layers for the east, west, and south sections. In fact, each of those sections has a separate layer for the low, medium and high density building groups for the part of the city inside the inner wall in that section as well as a separate layer for low, medium, and high density building groups outside the inner wall. On top of that there are separate layers for the roads which are broken up based on low, medium and high road networks for the inner and outer portions of that section.
But wait til I get going! (Obligatory Princess Bride reference.) Each area that can join two sections of the city is another set of low, medium, and high layers for the buildings and roads for the inner and outer parts of that section. Also, if all three sections are joined and all three join areas are used there is a need for a center section.
On top of that some sections have special things that need extra layers. The keep is an example of this. Not only are there three layers for the castle (the keep, an expanded keep and the keep’s wall) but there are also a couple of layers that hold the buildings and an extra road in case there isn’t a keep.
And don’t forget the walls (inner and outer walls, for each section and each join area) and extra layers for buildings and a road or two in case the inner wall doesn’t exist but there is an outer section to that part of the city. (Otherwise there would be a gap where the inner wall would have been.) Finally docks and bridges also needed layers.
Once the image with all these layers is ready, one has to export each layer (or sometimes a few layers together) as an image. For example, the low/medium/high density buildings get exported as one image with just the buildings needed for a low density distribution as one image, then the low and medium sets of buildings are exported as a second image representing those two sets together, and then all three sets of buildings are exported as a third image. Then in the page a random number is used to determine if that section should show the low, medium or high density image.
(As alluded to above, the low, medium and high density building sets were exported as separate images before the update and if medium was needed then both the low and medium images were displayed and if high was needed then all three were displayed. Changing it so the high density image includes the other two should make for a faster page.)
Anyway, the road networks work in a similar way to the building networks. (And they had the same issue until today’s update.) So there is an image that displays the city’s eastern inner section low/medium/high density roads and another one that displays the eastern inner low/medium roads and another that does the eastern outer low/medium/high density roads.
I hope you find the webpage/program useful!
Great job, Joe. I like the maps generated. Having recently built a city map from scratch, I know how much time your tool will save GMs.
Thanks Johnn! And I know I am long overdue to send you an email. 🙁
Your generator is great tool! Thank you a lot. 🙂