News Liste Going Medieval
As mentioned in the previous MMT, we’d like to discuss some of the challenges we are facing with the incorporation of water and why working on it took time. Hopefully, this might give a better understanding of our process, but also our problem solving approach.
It’s worth noting that with the water update, the layout of existing map seeds will be changed if you start a new game. Basically, this means they will have a new layout and old images will not be a proper representation of those maps. This is partly due to implementation of rivers and lakes on maps and partly due to the terrain calculation of those areas. It's nothing game breaking, but it's good to know. In the images below is the map seed 1845052011 hillside, medium size. Left side is the current live build (0.15.8) while the right is created with Update #10. If anything, the new version is a bit richer in levels even when you take water out of the equation.
So how did we get here? How are the positions of rivers, lakes and water overall, calculated for each map? Well, as the latest addition to the game, it made sense that water positioning should be a last step of map generation.
From the start, we had three things in mind: rivers, lakes and a new type of map (marsh) where the whole map is flooded with shallow water and there are islands on the map.
Marsh was a bit different from your regular map as it required a global water level and under this level, everything should be flooded. With that in mind, what happens if you dig down in the marsh area? It makes sense that such a terrain would be wet by all the water around it, right? Digging such land would have to be a bit different. So that’s why we added marsh soil - it offers less soil and can spawn water in case you dig them out; so that if you dig a deep hole, you might find water, and the deeper you dig the more water you may have in that hole. This ground type has a darker and wetter appearance on Marshes.
Okay, but what does it mean for spawning points for animals/merchants/raiders on marshes? Since water gives a penalty to those that traverse it, humans/animals would seek to avoid it when possible. We also had to make sure that events are differently balanced on this map. So there will be no situations where a bunch of deer would appear suddenly (silly deer).
Back to the regular maps. Lake generation sounded simpler, so we started with that. We used so-called 'brushes' during map generation. Think of brushes as a small texture akin to stamp. The lighter the color of the brush, the deeper the lake. They could raise and lower height, set materials inside the terrain, and make holes to the map. Cool. But we had to add water too.
The first iteration of pasting a 'lake brush' did just switch the top voxels of the terrain with water. So a water voxels would cover the designated area of an “empty” lake and would fill it out accordingly. It worked just as intended on flat maps, but on those with more elevation such created lakes would flood half of the map. Yeah. This was because there were no clear limiters to the present system.
Something had to be done before pasting the brush process. The solution for this was to flatten out the terrain where the lake was and then carve the lake into the terrain. An additional layer of ground voxels, a wall on the level of the water surface was needed around the lake to make sure that water doesn't flow out of the flat area. This had to work for every map type, even mountains.
The next step was to handle the situation where we want to place multiple lakes on the map. The brushes which carve the lake into the terrain and fill it with water are placed randomly and may overlap, and this meant that lakes could overlap, too. To fix this, we placed ground to work as a divider of water between different elevation levels at this point of map generation voxel. This means no waterfalls inside a lake.
But we also had to consider what YOU want to do here. Would you like to deplete lakes by covering them with dirt voxel? You can try to do that. It might appear as a Sisyphean task, but it can be done. Additionally, what if you want to connect those two lakes? Again, it is possible, but plan it properly and be ready for potential consequences. These scenarios are better when they are player made. What we try to set up at the start is a balanced experience regardless of the map type and size. Which, hopefully by now, you can see that it is not as simple a process as it may look.
That’s just some of the marsh and lake trivia. You know what was more challenging? Rivers! Those are a completely different can of worms (hehe) in which there are no brushes, only perlin noise, angles, curves, waterfalls and a whole new set dimension of problems to solve. Are you curious to hear about this too? Just check this funky river curve and volume calculation:
If there is enough interest, we might dedicate another MMT to it, but if not, we understand (and our programmer thanks you).
As mentioned before, we have an idea when the water update is going live on the experimental branch. Currently, our internal QA team is testing it and things are looking stable and promising. If everything goes well, expect it to appear on the experimental branch in 10 days or so. As it goes with these things, it will stay there until we are confident that everyone is having a proper experience, which usually takes us a couple of weeks. But things are looking neat so far!
Foxy Voxel
(we have a dev page on steam now, yay)
Release:01.06.2021
Genre:
Simulation
Entwickler:
Foxy Voxel
Vertrieb:
The Irregular Corporation
Engine:keine Infos
Kopierschutz:keine Infos
Franchise:keine Infos
Einzelspieler
Mehrspieler
Koop