Development Update - July 2025
Added 2025-07-01 19:27:56 +0000 UTCHey everyone, hope you're all doing well. I just wanted to give a quick update of what I've worked on in the last few weeks. Since the last post, I got a couple of bug reports that more 'thin' buildings were being generated than in previous versions. For example:

Additionally, there has always been an issue with weird shaped buildings (especially in suburb areas) - for example:


So, a couple of weeks ago, I set out to try and fix these issues.
One easy option to fix this issue is to just filter out any building shapes that seem invalid - however this is fairly annoying to efficiently detect. A simple heuristic to find narrow sections of buildings is to check if a building edge is connected to two close-to-perpendicular edges, and if that middle edge is too short then this is a narrow segment. Another simple heuristic would be to check if the angle between two edges is too sharp. However, these do not detect everything (e.g. hourglass shaped buildings).
To fix these weird shaped buildings, I first observed that many of the weird shapes come from buildings wrapping around interior corners of the larger lot. The buildings-in-lot placement algorithm essentially works by repeatly dividing a lot area in to smaller plots, by taking a lot that is too large for a building, proposing a random cut, and then determining the new lots, repeating if necessary. Could I fix a lot of the weird building shapes just by proposing better cuts? Yes!
The previous cut algorithm basically looked at the longest edge in the lot polygon, and then proposed a cut that was perpendicular to that edge, originating from the center of the edge. This worked fairly well, but obviously it struggles to do anything with internal corners - which there are now a lot more of since the suburb update.
I've now updated the algorithm to first cut perpendicular to interior corners, which now results in much more rectangular shaped lots given to the original division algorithm, which alone fixed many of the weird shaped building issues. I also tweaked division algorithm to change how it prioritised divisions. In the example below, the old algorithm would use the cut shown in blue (the lot is in red).

The new update now proposes a horizontal cut in this case. Essentially, this is done by finding the edge that is closest to the centroid of the lot, and then proposing a cut from that edge through the centroid.
This new cutting approach, combined with the simple narrow section heuristic (and a tweak to wall generation), seems to have reduced the number of weird / narrow buildings in a settlement. Now, due to the random nature and the heuristic based approach to filtering, it's not impossible, but this feels like a good balance of performance and the quality of the result.
Conclusion
This update has gone live now, so check it out and let me know what you think! I'm not exactly sure what I'll work on next, but there are a couple of smaller things that people have requested that I want to tick off. As always, thank you for all your support, and if you have any thoughts or other feedback, please let me know!
Comments
Thanks! At the moment that isn't possible, but different map effects / colours is something I'd like to add, as well as for different biomes
Thomas Allerton
2025-08-11 20:37:28 +0000 UTCHey Thomas! Love this city generator. So helpful, intuitive, and powerful! And great continued updates. Wonder if there might be a good way to design "underground" settlements, such as a dwarf city built within the mountains or a drow colony in the underdark? The cities that the generator makes are fantastic at making overland settlements, but the colors and building type aren't convincing for anything underground.
Freddy Hewitt
2025-08-11 20:35:41 +0000 UTC