Sign in to follow this  
amorfides

Dynamic water levels

Recommended Posts

With the upcoming Wurmnautica update in sight I think it would not be a bad idea to suggest dynamic water levels.

In real life water is not on the same level everywhere, there are springs, waterfalls, rivers, there are caves with their own local water level,...

 

At this point this mechanic isn't yet introduced in the game while the weather effects causing these natural phenomena are in the game.

 

It would be a valuable addition to the game and would bring a lot of challenges and opportunities. Just some idea's :

  • Diverting the flow of a river because you want to build something there or to have a river destroy something
  • having a current because of the slope the water moved on and have that affect things like the erosion on soil or the ability to swim across
  • Ships can't go against the currents upwards, so you'd need to construct a water lock (already existed in the middle ages) to reduce the current and allow ships to go upwards inland. 
  • Mining could become more dangerous, a source of water in a cave could be behind the next tile you take out, flooding the area and possibly drowning you unless you take the needed precautions. 
  • Like 1

Share this post


Link to post
Share on other sites

IIRC something was tested before with flowing water in the past but it spiked server load a massive amount. I could be misremembering but I do recall something related to more dynamic water being tested and then scrapped because it wasn't working out well server side.

Would be interesting to see it redone and retested with our current servers and see if optimisations could be made, but I'm no programmer.

Share this post


Link to post
Share on other sites

I was thinking about water on land for a while know and how to maybe implemnt it in Wurm. The only real idea that came to mind would use a similare system then the current split between dirt and stone. Basicly generate a "layer" of water that is above the dirt. Dirt have a "flow" model if you raise it to steep you could do the same with watter just use 1 dirt hight difference instad of 40 for it to start flowing and you shuld have somthing like a natural downhil movment. Question is how intensiv this flow would be on the Server needs since it would need way more frequent updates then the Dirt flow model that is only checkt when a corner is changed.

Share this post


Link to post
Share on other sites
1 hour ago, amorfides said:

 

  • Mining could become more dangerous, a source of water in a cave could be behind the next tile you take out, flooding the area and possibly drowning you unless you take the needed precautions. 

ehhh nooooooo

 

but im all for more dynamic water, but it need to be implemented in a way that doesnt effect the gameplay to mutch

Share this post


Link to post
Share on other sites

To me this seems like a gargantuan task for the devs.


Where does water originate?

Where does it flow?
When does it flow, when does it fall?
Does fast flowing water have an effect transporting dirt?
How wide do brooks and rivers naturally get?
Are there fish/other animals in there?

Do they stop other animals migrating/wandering?
How does one stop landscaping having undesired effects downstream?
Can it be abused and if so, what rules will prevent that?
 

And then: how to implement it on the existing servers?

What are the effects on existing landscapes?

Or are new servers needed?

 

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, amorfides said:

With the upcoming Wurmnautica update in sight I think it would not be a bad idea to suggest dynamic water levels.

In real life water is not on the same level everywhere, there are springs, waterfalls, rivers, there are caves with their own local water level,...

 

At this point this mechanic isn't yet introduced in the game while the weather effects causing these natural phenomena are in the game.

 

It would be a valuable addition to the game and would bring a lot of challenges and opportunities. Just some idea's :

  • Diverting the flow of a river because you want to build something there or to have a river destroy something
  • having a current because of the slope the water moved on and have that affect things like the erosion on soil or the ability to swim across
  • Ships can't go against the currents upwards, so you'd need to construct a water lock (already existed in the middle ages) to reduce the current and allow ships to go upwards inland. 
  • Mining could become more dangerous, a source of water in a cave could be behind the next tile you take out, flooding the area and possibly drowning you unless you take the needed precautions. 

While the idea of rivers in the mountains is nice and have long been wished for the Wurmnautica was a Aprils Fool thing.

I remember there were water cubes on test for a while when they experimented with water but they dropped that short afterwards.

In Wurm the water level is a very static thing and probably would take heaps of coding and considerations as Myriad mentions.

Share this post


Link to post
Share on other sites

I'm not saying this would be a trivial thing to implement in a way that doesn't drastically load the servers and in a way that doesn't cause lag spikes. Fluid dynamics are a challenge in many games and engines.

 

In terms of implementation i thought maybe something like this could be possible:

Water comes in through rain, this way there's no need to adapt maps but just have it play out organically.

A matrix calculation could be used to get local minima and their radius in terrain height across a map (combination of rock layer and dirt layer which already exists and gets updated). This calculation could be done for a submatrix before rain happens and/or when a different event happens that forces it to update (for example, a player enters into a visible range, after a certain amount of time,...). This way it minimizes the load on the server for general performance and it can be calculated for the whole matrix in times where there's little activity on the server. 

For the storage of information for the water on top i'd use a matrix/layer for water that's located above the dirt layer to hold the information for the water on the top layer. Then in the event of rainfall, the most basic example where water comes in, there could be a fixed amount of water per second that it rains per tile, multiply that number by the number of tiles in the radius around a local minimum and add that amount to top water layer on the coordinates of those local minima. 

I'd use a different 3 dimensional matrix to track the water in the ground. Dry ground will slurp up the water. Lets say that one unit of water can infiltrate one unit of dirt and for each unit of dirt to be infiltrated there needs to be an extra unit of water on top. So to have 5 levels of water on a tile there either needs to be rock under that tile or 6 saturated layers of dirt (or less if there's rock on a lower level than 6).   

 

The issue of water spreading from the local minima to the surrounding tiles based on the slope and tile height surrounding the minima would be an issue both in the dirt water layer as in the top water layer. For both matrices a spreading algorithm would need to be applied on a specific clock, but I wouldn't have it executed on each tick but have a formula made where the amount of ticks since the last execution is a factor and then execute it for a submatrix whenever there's an event that causes it to be required. 
For the dirt/rock water there could be spread downwards until the water hits the rock layer and the slope of the rock layer determines which tile will get saturated next. But there the saturation would be from the bottom of the dirt pile along the slope of the rock. Infiltration through dirt should be a slow process that takes a certain amount of ticks. 

For the top water spreading could be determined by the slope on the tile and the next local minimum that's not yet under water. 

With this spreading of water on the top layer you get lakes in the valleys of mountains. The infiltration in the dirt layer and eventually running across the rock layer could cause water to pour out in a different part of the mountain along the slope of the rock layer. That's how you could have rivers. 

 

It's certainly possible to code but it would take a lot of thought and consideration to do so in a way that doesn't make the game unplayable. Btw, too bad that the Wurmnautica thing was an april fools thing. It looked quite convincing. 😛

 

 

Share this post


Link to post
Share on other sites

Just having water at different elevations would be cool enough, even without any fluid mechanics or whatever.

Share this post


Link to post
Share on other sites

 

7 minutes ago, Zundy said:

Just having water at different elevations would be cool enough, even without any fluid mechanics or whatever.

 

Would be possible if you restrict digging actions around places where there's water.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this