Thursday, February 23, 2012

Timesink, part 7: Schematics to bobs to oh god snore

There have been a few people that have asked how I'm getting buildings and such into the minecraft world. I can assure you that I am not lovingly hand crafting them. Today, I'll talk a bit about how I am doing it. It'll be a pretty boring post for anyone that doesn't run a minecraft server though.

First, let's start with schematic files. I'm not going to go into detail about what a schematic file is exactly. If you are really interested, you can visit other sites. Suffice it to say that schematic files are the way some applications and bukkit plugins allow server admins to save things made in game to a file and/or import objects into a server. There's a whole community out there where people make and share various schematic files. These files can range from trees to entire cities. The down side is that schematic files are not human readable.

There is a (somewhat) competing format variously called bo2, bbob, and bob. These files are meant to be used with the TerrainControl plugin. In addition to allowing admins to create some pretty amazing looking worlds, TerrainControl also allows for the placement of things like custom-made trees as the world is being made. What this means for an admin is that the world can be populated with ruins, giant trees, unusual looking cactus, etc, and it all gets added as a player explores the world, based on frequency rules and spawning locations defined in the bo2 files.

For example, one could have an igloo object and have it only appear in cold, snow filled biomes. One can also define whether the landscape is covered with igloos, or whether igloos appear in clusters. One really nice thing about bo2 files is that they are human-readable, basically defining an x,y,z:block type. There are downsides, but this isn't a review.

Now, there are tools out there that allow one to batch convert schematic files into bo2 files, so here's what I did:

1.) I decided on five different environments a player sees in a minecraft game--snowy, desert, plains, forest and swamp--and I started looking on http://www.mcschematics.com/ for building types that would fit the environments. For example, the desert environments have lots of sand and not so much wood, so I chose building types with lots of sand, sandstone and stone. In general, things worked out like this:
     Desert- Ancient Egyptian/Sumerian/Babylonian/Arabian styles
     Snowy- Chinese/Japanese styles
     Forest- European Medieval styles
     Plains- Ancient Greek/Roman/Byzantine styles
     Swamp- Mayan/Aztec/Khmer styles

2.) After I had accumulated enough municipal buildings, temples, towers, monuments, houses and shops for a given style, I would convert the schematics to bo2 files.

3.) I batch replaced certain block types to make the styles look more uniform. For example, I decided the Swamp architecture should not have any wood and should mainly use cobblestone. By replacing more exotic materials (like a diamond step pyramid) with materials more in line with the rest of the buildings, it makes sure everything seems consistent.

4.) Dialing in the details about how often buildings appear was the hardest part. Partly based on the area of the building, partly based on the type of building (municipal buildings, temples, towers, monuments, houses and shops), I would experiment with settings and then see how things looked.

So there you have it. The details are far more boring than this boring-filled post could take. At this point I have all my architecture types sorted and am pretty happy with the resulting cities. Next post I'll talk about how I'm using a python script to help me place the cities.


Wednesday, February 8, 2012

Timesink, part 6: Home, home on the range

I think I've finished the architecture types for the culture that will appear in the more grassy areas of the game:


I still need to monkey with the frequency at which things appear, but I'm nearly ready to start really putting the things onto the server.

Next time, where are these buildings coming from and how am I getting them to appear in the game.

Thursday, February 2, 2012

Timesink, part 5: Woodland architecture

I think the building types destined for wooded areas are finished:


I think the only environment I have left are the more grassy plains.