Jump to content

Gummyslav

Vintarian
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Gummyslav's Achievements

Wolf Bait

Wolf Bait (1/9)

6

Reputation

  1. Thank you for the warm welcome. I didn’t expect such a quick and positive reaction My initial idea was that rivers would be generated in a second phase, after the terrain is already in place. This would allow the properties of the terrain to influence the rivers (for example, if a river flows over sand, it might have a lower potential to propagate due to drainage). But that might be overthinking it. I must admit, it’s a bit hard for me to fully grasp my own idea, but I think you understood it well. For the sake of explaining it, I made a simple simulation. While it deviates slightly from my initial vision, I personally think the results look convincing. I made two GIFs simulating river pathfinding on flat terrain. To simplify things, I assumed that the initial “potential” of a river is 5, and it decreases by 1 after each cycle. If no path to an elevation drop is found after 5 cycles, the river ends. When a path is found, the cycle count resets. If more than one path is found, the river branches, and each branch has its potential reduced by 1. While I’m one of those slightly masochistic players who turn cave-ins and soil instability on, I assume floods would be a bit too much I love your idea of river-flat blocks. They promise a lot of fun and new possibilities while not being too punishing or unrealistic. I’m really glad this sparked such a discussion
  2. Hello there I am no expert when it comes to VS worldgen (or any worldgen for that matter), but I thought I might share my thoughts on how I would approach the issue of generating rivers (I just couldn’t sleep today and I’m quite obsessed with the game at the moment). My hope is that even if most of my ideas are not relevant, they will at least help the devs see their current system from a fresh perspective and push their thinking in the right direction. I would start with generating underground water bodies and springs. The size of an underground lake would determine the initial speed of a river. For a more realistic approach, I would wait with carving the landscape until a “head” of the future riverbed (I think of it as a snake) reaches an elevation drop. The head would move in one direction on the surface of the ground, creating a “path”. The head’s speed could be slightly reduced when moving on dirt, gravel, sand, etc. The path would branch after a certain distance (the greater the distance, the faster the head), if there aren’t any nearby obstacles along the possible new path. No more than two branches would be added on the sides of a path, and they would deviate from it at an angle depending on the head’s speed. The faster the head, the smaller the angle. Additionally, the current width of the river should reduce the likelihood of branching - the wider the river, the less likely it is to form new branches, reflecting increased stability of larger flows. Each new path would have its own head, which would be slightly slower than its parent. When a path X bumps into a path Y, it merges with it. The head of path X stops moving. The speed of path Y and its children’s heads increases. If any of the heads reaches an elevation drop, all the other heads stop. Now, if any of the other heads is in very close proximity to an elevation drop too, and its speed is higher than the speed of the first head to reach the drop, the riverbed should branch. The riverbed path is generated based on rounded path vectors that create the shortest way to the drop. The depth of the riverbed depends on the blocks forming the floor and the speed of the “victorious” head. The softer the floor and the faster the head, the deeper the riverbed. The riverbed’s width should be based on the number of branches of the main path, the floor blocks, and the average elevation difference between the last few sections of the riverbed. (If there are many large elevation drops in the recent sections, the width should increase more slowly—the harder the ground, the stronger this effect. Mountain streams would be narrower, while rivers on muddy plains would be wider.) A riverbed should influence nearby land and form banks. One new head continues in the same direction after the drop, and its speed is increased if the drop is small (and decreased accordingly). Lakes form when: the heads of the paths have low speed, struggle to reach a drop, and often merge with each other, riverbeds with opposite vectors meet, there is a big drop (small drops wouldn’t form lakes). Lakes may or may not be the end of a river. Let’s take a closer look at the three scenarios I listed above. If the conditions for a lake are met and the chances of any head reaching a drop are low, the river ends. When two riverbeds meet, river A could strengthen river B, or they could spawn a new head with a speed and direction based on their vectors. I’m too tired at this point to think about it any further xd Lakes formed by drops spawn a few heads in all directions. Their speed is lowered proportionally to the height of the drop, but increased based on the width of the riverbed before the drop. We should also consider the depth of the lake, depending on the speed of the head that reached the drop and the height of the drop. Once we have the riverbeds carved into the world structure, we fill them with still water and cover them with one layer of flowing water. The velocity of the top layer could be calculated based on the width of the river, the average velocity of the previous few “sections”, and local elevation drops. The top layer would have a pushing force based on its velocity and would transfer it to the still water below. I wonder if you are planning to go even deeper into the rabbit hole and introduce a mechanic allowing water from lakes and rivers to overflow the banks during heavy rains (floods!) and then slowly evaporate or sink into the soil and replenish groundwater resources (possibility of droughts and seasonal rivers!). Even if not, you are still awesome and I can’t wait to see what you’re cooking for us in the updates to come.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.