9.3.11

Generative cities



Here’s an explanation of what you’re looking at:

Height map generation : Here I’m manually editing a height map and creating a river, but I could just generate the whole thing, using similar fractal based techniques we already used to make Darwinia’s landscapes.

Population density : I’m marking the areas of the map that will be most densely populated. These areas will have the most roads and highest buildings.

City Centre generation : Based on the population map, it’s just searching for the high points. This is used later in road generation.

Highway generation : Based on the height map, the population density and the city centres, the Highways are automatically generated. Highways will tend to form fairly rigid patterns near the city centres, and will try to go around tall hills where possible. Highways near rivers will form coast roads that track the river, and some will be promoted to bridges where the population density is high enough.

Street generation : Streets are short local roads that connect the area to the nearest highway. In the centre of cities they form fairly predictable grid patterns.

Block generation : The street map is searched to find every possible “block”. A block is an area of land surrounded on all sides by roads, and without any additional roads running through the block area. Blocks are the area you build on, so when each block is found the land under it is flattened slightly to make building a little easier.

Building generation : Based on the population density (and eventually the zone type – residential, commercial, financial etc) buildings are generated and placed within each block. Right now this step is too simple – in reality blocks should be divided up into smaller “allotments”, and each allotment should have its own building, but we haven’t gone that far yet.

And finally, Rendering : This is our first attempt to render the results in a moody style more fitting to the game. Lots more work to be done here, but we're happy with what we have so far.

No comments: