I've recently implemented an algorithm for a procedural city layout. It's still very much a work in progress, but seems promising to me. Take a look:
procedural city example http://farm7.static.flickr.com/6058/6265712588_137e3df1f7.jpg
The algorithm used to create this layout is loosely based on L-Systems. I have a base Element class, that has a rectangle marking its place on map and a method Grow, which creates other Elements inside the rectangle, and/or spawns some objects on map.
Then there are actual elements, inherited from this base class: City, Street, Building etc.
The generation starts with a number of "seed" objects (in my case, just a single City element randomly placed on the map). Then the system iterates over all elements, calling Grow, until all elements become inactive (Grow returns false), or some large number of iteration passes.
The city in the picture is built using only a few simple rules:
Citybecomes aStreetelement splitting the area someplace.- All
Streets grow 0-3 side streets, further splitting the area. - Also,
Streets continuously try to fit a random-sizedBuildingat the side.
The result is not terribly interesting, but not bad either. The system can be extended easily, and is simple enough to understand what's going on (-8