Page 1 of 3

[Mod] Finite / Realistic Water [outdated] [waterplus]

Posted: Thu Jan 10, 2013 20:56
by rubenwardy

Waterplus Mod

I have made a Finite water mod.

Youtube video

For those of you who do not know, Finite water is water that runs down hills, spreads and does most of what real life water does.

video of the Minecraft equivalent, with a guy explaining it.

Using this mod

To get the finite water, pick up some water with a bucket and then drop it.
You can also get finite water in the creative inventory, or by typing /giveme waterplus:finite_20

Is it a bit too slow for your liking? You can try to increase the speed of the abm by decreasing the interval of the abm in finite.lua

Not detailed enough? Increase the water_finite_steps property in init.lua

Download

This mod is not finished yet, and it is not recommended that you use it for servers, but you can still try it out by downloading it below.

License: CC0

Dependencies: Nothing, but works even better with bucket

Speed testing

I have tested the speed of this mod on my system.

No finite mod (control)
Using the vanilla minetest_game
Frame per second: 40 FPS
Loop time: n/a
Just Finite
Just a few finite lakes and puddles
Frames per second: 35 FPS
Loop time: half a second
Finite Ocean
All of default:water_source was converted to finite
Frames per second: 8-20 FPS
Loop time: 30sec - 1 min
Loop time is the time it takes to cycle through all of the finite water nodes.
Basically, it is how long it takes for a node to flow / drop again.

TO DO

letting it rain:
  • water drops: on land make waterplus:finite_1
  • puddles
  • rain generator

Posted: Thu Jan 10, 2013 21:13
by Casimir
O_O

Posted: Thu Jan 10, 2013 21:30
by cHyper
awesome mod... keep up the good work...

Posted: Thu Jan 10, 2013 21:37
by jordan4ibanez
Make the water do
if minetest.env:get_node({x=x,y = y - 1,z=z}).name == "air" then

then make water fall

Also:
Replace default:water_source with the highest level of finite liquid as a mapgen alias.

Posted: Thu Jan 10, 2013 22:50
by nomohakon
Mod worth worshiping.

Posted: Fri Jan 11, 2013 00:01
by Inocudom
This mod is my preferred behavior for water as well as lava and all other liquids. The usage of this mod will make liquid griefing much more difficult and give the pipeworks mod more significance.

Posted: Fri Jan 11, 2013 01:54
by leo_rockway
This is doubleplusgood. Thank you.

Posted: Fri Jan 11, 2013 13:30
by yves_de_beck
Very Cool. I like it =)

Posted: Fri Jan 11, 2013 14:39
by Ragnar
no more water generators, i guess :/ (Only reason why i say -1)

Posted: Fri Jan 11, 2013 15:27
by kaeza
Ragnar wrote:no more water generators, i guess :/ (Only reason why i say -1)
AFAIK, "water generators" as you call them still work.
EDIT: Typo.
EDIT2: This mod is awesome; +1000000

Posted: Fri Jan 11, 2013 15:30
by Ragnar
YAY!
+2 (Makes up for your -1 :D)

Posted: Fri Jan 11, 2013 16:47
by rubenwardy
jordan4ibanez wrote:Make the water do
if minetest.env:get_node({x=x,y = y - 1,z=z}).name == "air" then

then make water fall

Also:
Replace default:water_source with the highest level of finite liquid as a mapgen alias.
Yes, thank you. This would be the next thing I am going to do.

Posted: Fri Jan 11, 2013 20:34
by tinoesroho
Lookin' good! +1

Posted: Sat Jan 12, 2013 15:36
by Bas080
Good idea. I'll keep an eye on this.

Posted: Sat Jan 12, 2013 16:21
by BrandonReese
How CPU intensive is this mod?

Posted: Mon Jan 14, 2013 16:42
by rubenwardy
BrandonReese wrote:How CPU intensive is this mod?
I have done no tests, all I can say is that it depends on how much finite water there is.

This mod uses an Active Block Modifier to check if any of the surrounding blocks are lower than it is, and if so it starts flowing water into it.

So basically, a waterfall or a pond of finite water will not be that CPU extensive, but if you replace all default water with finite water... only tests will show.

Posted: Mon Jan 14, 2013 17:44
by Casimir
You could make one waterblock that is not finite/flowing, that is just a block. Use that one for oceans and lakes and only use the "expensive" flowing one at the edges of that.
I try to illustrate what I mean. Profile view:

Code: Select all

sssffffffffffsss
ssssfbbbbbbbfsss
sssssfbbbbbfssss
ssssssfffffsssss
ssssssssssssssss
s: stone
f: finite water
b: block water

You would have two abm. One for flowing, one to check if a block is still surrounded by flowing water or block water (and change it to flowing if not).

Posted: Mon Jan 14, 2013 17:46
by jojoa1997
+10

Posted: Mon Jan 14, 2013 18:02
by rubenwardy
Casimir wrote:You could make one waterblock that is not finite/flowing, that is just a block. Use that one for oceans and lakes and only use the "expensive" flowing one at the edges of that.
I try to illustrate what I mean. Profile view:

Code: Select all

sssffffffffffsss
ssssfbbbbbbbfsss
sssssfbbbbbfssss
ssssssfffffsssss
ssssssssssssssss
s: stone
f: finite water
b: block water

You would have two abm. One for flowing, one to check if a block is still surrounded by flowing water or block water (and change it to flowing if not).
Good idea, but it would be pointless with the system I use.

The system I use checks if the water around it is lower than it is, and then it flows.

So, basically there would be no point in doing that really, no CPU gain.

Posted: Tue Jan 22, 2013 20:12
by rubenwardy
This mod has been released

Posted: Tue Jan 22, 2013 20:19
by sfan5
Nice Mod!

Posted: Sat Jan 26, 2013 10:16
by rubenwardy

Update

Made finite water smoother in flowing

Posted: Sat Jan 26, 2013 15:34
by proller
mod of mod 8)

features:
- fast dropping large volumes of water
you can flood underwater caves - just place finite warer block on standard water slope
- convert finite water to standart and back - for speed

todo:
pressure
destructable water flow

https://github.com/proller/waterplus

rubenwardy: thank you for good start

Posted: Sun Jan 27, 2013 14:26
by proller
big changes:
dont need to change init,lua
water_flowing now converts to finite water and finite water converts to water_source
- just install and play
faster flood underwater caves

Posted: Sun Jan 27, 2013 15:40
by proller
at this point imposible to make much faster via modding,
liquid dynamics must be implemented in c++ core.
level 1 - something like this mod, liquid must drop and flow with preserving total volume
level 2 - add presure property to make fountains like

swws w - water
swws ^ > - stream
swwss^s ^ - pushed up water
sww>>^s
sssssss