DwarfCraft: A Tragedy

See DwarfCraft on GitHub

 If you have read about my interests, then you know that procedural generation is an interest of mine. Although I was interested in it, I lacked a canvas to test out my ideas. My dream was to program a procedural generator for Minecraft, but alas, for so long this goal seemed out of reach.

The classic option of using MCEdit filters wasn't going to cut it. For one thing, they lack the fidelity that I wanted. For another thing, MCEdit hasn't been developed since 2016, and doesn't work on newer versions of Minecraft. All seemed lost for my dream – until I found Amulet.

Amulet is the next generation of Minecraft world editors. It is in active development. When I found it, the project was in it's infancy, and I had no clue what was going on in the code. There was basically no API documentation. So, I did the only thing that I knew to do - hack. The result of this hacking was DwarfCraft.

The rationale for DwarfCraft was that caves in Minecraft are boring. You go down into the cave, there are some monsters, but there are only monsters because it is dark. The only thing to see is stone, gravel, and occasionally ore 1). I wanted more interesting caves.

DwarfCraft added:

DwarfCraft also boasted an impressive command line interface. Almost every aspect of the world generation could be configured from the command line. Running “main.py –help” speaks for itself:

usage: main.py [-h] [--full_reset] [--skip_ores] [--ore_pockets_per_chunk ORE_POCKETS_PER_CHUNK]
               [--ore_pocket_size ORE_POCKET_SIZE] [--skip_caves] [--cave_fill_cube N] [--cave_length CAVE_LENGTH]
               [--cave_max_size CAVE_MAX_SIZE] [--cave_min_size CAVE_MIN_SIZE] [--skip_cave_deco]
               [--glowstone_clusters GLOWSTONE_CLUSTERS]
               [--glowstone_cluster_spawn_chance GLOWSTONE_CLUSTER_SPAWN_CHANCE]
               [--glowstone_cluster_compression GLOWSTONE_CLUSTER_COMPRESSION]
               [--glowstone_cluster_max_length GLOWSTONE_CLUSTER_MAX_LENGTH] [--lava_pools LAVA_POOLS]
               [--lava_pool_spawn_chance LAVA_POOL_SPAWN_CHANCE]
               [--lava_pool_punishment_factor LAVA_POOL_PUNISHMENT_FACTOR] [--lava_pool_fill LAVA_POOL_FILL]
               [--mob_spawners MOB_SPAWNERS] [--mob_spawner_spawn_chance MOB_SPAWNER_SPAWN_CHANCE] [--bushes BUSHES]
               [--bush_melons BUSH_MELONS] [--bush_melon_spawn_chance BUSH_MELON_SPAWN_CHANCE]
               [--bush_spawn_chance BUSH_SPAWN_CHANCE] [--bush_compression BUSH_COMPRESSION]
               [--bush_min_size BUSH_MIN_SIZE] [--bush_max_size BUSH_MAX_SIZE] [--biomes BIOMES]
               [--biome_flower_spawn_chance BIOME_FLOWER_SPAWN_CHANCE]
               [--biome_grass_spawn_chance BIOME_GRASS_SPAWN_CHANCE] [--water_pools WATER_POOLS]
               [--water_pool_sand_border WATER_POOL_SAND_BORDER] [--water_pool_spawn_chance WATER_POOL_SPAWN_CHANCE]
               [--water_pool_sugarcane_spawn_chance WATER_POOL_SUGARCANE_SPAWN_CHANCE]
               world_path size

All of these options were documented. Here is the section that described cave generation options:

CAVES:
  --skip_caves          Skip cave generation.
  --cave_fill_cube N    One cave should be located in each NxNxN area.
  --cave_length CAVE_LENGTH
                        The length of a cave.
  --cave_max_size CAVE_MAX_SIZE
                        Maximum size of a cave.
  --cave_min_size CAVE_MIN_SIZE
                        Minimum size of a cave.

 So, what happened? Well, remember how I said the whole thing was hacked together? That came to bite me in the rear end. When I switched computers, DwarfCraft just kind of stopped working, for reasons I don't really understand. It likely had to do with me doing something hacky on the backend that “just worked” on my other PC.

To top it all off, Mojang released plans for their Caves and Cliffs update in October 2020, just five months after the last commit in DwarfCraft. Guess what Caves and Cliffs adds? New cave generation algorithms and biomes. 🤦‍♂️ Caves and Cliffs isn't exactly what my vision for DwarfCraft was, but it falls firmly in the “good enough” category. Caves will soon not be boring any longer.

So, was it all a waste of time? I guess that is a matter of perspective. I had a lot of fun creating it, although tinkering and experimenting was a bit maddening at times. Sure, procedural generation won't help me in my career, but learning the importance of dependency management might. Overall, I don't regret the time I spent developing this.

If you still want to play on a DwarfCraft map, even if the program doesn't work, boy do I have good news for you! The releases page for each update has an example world, for this very reason. So all is not lost. Be careful though - me and two of my friends (BJ and AD) were very quickly overwhelmed in the map.

1)
andesite, granite and diorite are given a seat on the council but not granted the rank of master