![]() We start by randomly placing cities and towns in the world. (Unfortunately, civilizations haven’t made it into our prototype yet, but they will be there soon!) Our solution is to turn simulating civilizations into a problem of “Cellular Automata”. These are special features which only occur in one place (such as a town, or a volcano), and which can have arbitrary effects on the terrain.Ĭivilizations are a tricky bit, since there isn’t a simple physical process behind how kingdoms rise and fall. Several “landmarks” are also placed randomly around the world. We want to change this to line up more closely with the way caves and ores are naturally created. To generate caves, we just sample a 3D Perlin noise function, and threshold on an arbitrary value we call "caviness," or in the case of ores, each ore has its own threshold and scale at which to generate patches of ore. Caves and OresĬaves and ores are generated on-the-fly during construction of the terrain voxels. The “desert” biome on the other hand specifies sand at the top level, and no vegetation whatsoever save for a few gnarled bushes. It also specifies that large trees should be fairly common, as well as berry bushes and tall grass. For instance, the Forest biome specifies that grass occurs at the top level, rock at the subsurface, and sand on the shores. Biomes also store which vegetation types and ground cover occur there. Each biome stores which blocks occur on the top surfaces of the terrain (usually 3 or 4 levels down), under the subsurface, and near the shore. In the future these parts will be based on actual physical processes, but for now it seems to work fine. To generate rainfall, we do the same thing. To generate temperature, we for now just apply a gradient from north to south, mix in perlin noise, and distort it. ![]() The terrain is classified into one biome or another based on the rainfall, temperature, height, and distance to a landmark. So far, we have the following Biomes: Grassland, Desert, Forest, Jungle, Taiga, Tundra and Hellish. “Biomes” describe the different types of terrain and vegetation which cover the landscape. Then, we look in the local neighborhood of the raindrop and compute an approximation of the gradient (which is the direction of steepest descent). First, we keep track of how much material is stored in the raindrop (this starts at zero). To simulate a single raindrop, we perform what is called Gradient Descent. Otherwise, we need to simulate a raindrop. If the pixel we sample is below sea level, we just continue. For some number of raindrops (say 5,000), we randomly sample pixels in the world. To simulate rain erosion, we literally simulate large rain droplets falling on the landscape and carrying bits of dirt from one place to another. One of the biggest such effects is erosion from rainfall, and weathering from other sources. That’s because in the real world, “nonsmooth” effects occur on the landscape which we haven’t simulated yet. However, it looks a bit too smooth and flat. It will have natural peninsulas, islands, bays, and lakes. What we have now (if we just pixelwise multiply the Fault Map by the Noise Map) is a pretty nice looking continent. Our procedure falls roughly into these categories: Faults, Hills, Erosion, Biomes, Landmarks, and Civilizations. Now, we’ll discuss some of the technical details of how the terrain is generated. This is very similar (though not quite as complicated) as the system in Dwarf Fortress or Realm of the Mad God (which have continents of a fixed size to explore) and less similar to Minecraft (which has infinite, but locally very repetitive terrain). This allows us to have global features on our continents (like erosion, very long rivers, and mountain chains) which get stored before play. Unlike the procedural terrain in many other games, our terrain is fixed in size. It will be different (yet somehow more or less the same) every time. It also means that each time you play DwarfCorp, a new continent will be generated from scratch. This means a set of rules (often random) is used to create each landscape, mountain, valley, lake, river, bay, hill, and kingdom you will find in these lands. The continents in DwarfCorp are procedurally generated. Dwarf Corps, commissioned by the king to send those “excess Dwarves” somewhere else, and to bring back precious ores and strange creatures, have taken it upon themselves to chart these new lands and claim them for the motherland. Luckily, the ingenuity of Dwarven science has produced the air balloon, and great Dwarven explorers, overcoming their natural Dwarven agoraphobia have spread out across the world in search of new lands.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |