logoalt Hacker News

Ef996yesterday at 10:27 AM1 replyview on HN

Haha. I myself tried to play CS like that. Start with a historical core. The thing is the way the game is implemented buildings only have rectangular footprints while in reality buildings occupy the spaces more organically. I actually spent quite some time on google maps trying to see what pattern historical buildings followed to fill in spaces but couldn't get a definitive answer. I drafted it at some point in sketchup. Here is the result

https://imgur.com/a/procedurally-generated-buildings-that-or...


Replies

noduermetoday at 1:56 AM

That's very cool! Thinking about historic city centres, like Prague, the presence of courtyards is also really important. But what often seems to happen is that several smaller buildings will conform their fronts to the curvature of the street, being more or less rectangular themselves, but not as deep as half the block, so that they form natural courtyards between themselves and the buildings on the opposite sides of the block. So in your example, the smaller buildings might be only 2/3rds of their depth, forming courtyards in the center of the block that aren't exclusively part of any one building. I'm not really sure why it happened that way, historically, that they didn't build as deep back into the block as they could. Perhaps because the apartments were small and they could get two across a hall if the rear apartment had a window to at least some air. (Having lived in one of these rear ones in Prague for a little while, I can attest that it's not a window you want to open - the air is mostly full of pigeon feathers and excrement).

The way you have them formed, though, seems to point to an obvious algorithm that would divide building fronts into tall rectangles and stitch them together. I wonder since you already have all those nice street splines, maybe they could be applied to the building faces and rooftops as well.