Okay, so I got into a discussion with my cousin about Minecraft things which ended in her convincing me to try to make something cool around generation. So I did. All yesterday afternoon while I was at their house, I worked on a Bukkit plugin which replaces the terrain generator with something that basically just renders an endless city. If anyone's ever seen
that video was kind of the inspiration/basis of the idea. There are still quite a few bugs that I'm working on, but I thought I'd post about it because it still looks pretty cool. Below are the plugin, and a world with a few chunks of it generated if you don't want to load up a server to look at it. If you use the plugin, you'll need some world plugin such as Nomcraft /shamelessselfpromotion or MultiWorld and teleport to the world "City".
Plugin: https://docs.google.com/open?id=0B7yzzD91paU_ODlOQ2JEcEE1a0U
World: https://docs.google.com/open?id=0B7yzzD91paU_cnZrUUFQang4V2sEDIT: I should add some more info about the process for those interested.
Basically, each chunk consists of a building(s) and some road. A single chunk per intersection seems a little small, and it looks a bit off, but for how much easier that makes it, it looks good enough.
The road is simply a four block border around two adjacent sides of the chunk (blocks 12-15 to be exact) with streetlights at regular alternating intervals. This stuff is all pretty hard-coded, and pretty boring, but necessary to look good.
The buildings are randomly generated based on a sort of set of templates. It first chooses a random height between $minsize and $maxsize where $minsize is 3 for shorter areas and 5 for taller areas. $maxsize is determined by a 3d sine-function-mixture based on the X and Z of the chunk being rendered, to give the "city" areas of taller and shorter buildings. Then a width and length are randomly chosen between the same $minsize and a different $maxsize which starts at 12. Then a material is chosen, always black wool for the taller buildings, but sometimes brick or wood for the shorter ones, which adds a nice feel to the alternating sized areas. Then the walls are created, randomly either in the full style or cut-off-corner style. The blocks are alternated randomly between the building material and glass, for windows. There is a column of glowstone placed at the center to attempt to light the buildings, but because of how minecraft's lighting currently works, it sometimes breaks. Some "floors" of stone are generated every three blocks. Then a roof is chosen, either flat or peaked, and is placed on top. If the building has a flat roof and is tall enough ($height > 40) it has a chance to additionally get come lights on top of the building.
After it generates one building, it checks if any more could fit inside the chunk, and still be greater than the $minsize. If so, it goes back and creates another building with a new $maxsize. This repeats until the chunk has been completely filled with buildings. And this repeats forever.
I hope that made sense to anyone interested.