Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finite liquid #482

Merged
merged 1 commit into from Feb 26, 2013
Merged

finite liquid #482

merged 1 commit into from Feb 26, 2013

Conversation

proller
Copy link
Contributor

@proller proller commented Feb 10, 2013

all liquids with constant volume and/or intresting effects like caves flood, bubbles, ...
its disabled by default and configurable for speed-realism
new config variables:

# Constant volume liquids                                                                                                                             
#liquid_finite = false                                                                                                                                
# Update liquids every .. recommend for finite: 0.2                                                                                                   
#liquid_update = 1.0                                                                                                                                  
# When finite liquid: relax flowing blocks to source if level near max and N nearby source blocks, more realistic, but not true constant.. values: 0,1,2,3,4 : 0 - disable, 1 - most aggresive                                                                                               
#liquid_relax = 1                                                                                                                                     
# optimization: faster cave flood (and not true constant)                                                                                                                    
#liquid_fast_flood = 1

module to make springs (infinity sources) (too destructive when placing above sea level!) https://gist.github.com/proller/4987328

testing server (can use any fresh client): h4.setun.net:30000

@rubenwardy
Copy link
Member

So cool. Well done for this.

@PilzAdam
Copy link
Contributor

Bugs:

  • The lowest level of water stays forever in its place
  • Whole oceans turn into flowing nodes if water is taken from them
  • There are tons of graphical glitches in oceans
  • The performance isnt eally good

Suggestions:

  • Remove the lowest level of water when next to air
  • If a liquid with the highest level is next to one with the highest level -1 turn both into sources
  • Use the source block texture if liquids with the same height are next to each other
  • Update more frequent and in slower steps to get better animations
  • Maybe keep infinte sources and only handle flowing nodes with the new system.

@PilzAdam
Copy link
Contributor

It should be also saved per-world so old maps arent broken.

@proller
Copy link
Contributor Author

proller commented Feb 10, 2013

There are tons of graphical glitches in oceans

most of them is air bubbles, other - bug? in mapgen - layers of air under water, but all of them disappear over time

The performance isnt eally good

now only 2000 cycles every second, should be better

Maybe keep infinte sources and only handle flowing nodes with the new system.

its posiible via water_source param2 == 128 (last bit) -> infinity source

It should be also saved per-world so old maps arent broken.

now its fully compatible with old transformLiquids , and now saving per-world is no sense

@proller
Copy link
Contributor Author

proller commented Feb 10, 2013

Remove the lowest level of water when next to air

bad idea -
steps: levels and air
321A
32AA
311A
22AA
21AA
2AAA
11AA
1AAA
AAAA

and there is no water

@proller
Copy link
Contributor Author

proller commented Feb 10, 2013

i think it almost ready to merge.
big bugs fixed -> speed now better.
by default it disabled, to enable write in config:
water_finite = true
water_update = 0.2

number of levels not changed - it fully compatible with old saves, and new saves with old code.

@RealBadAngel
Copy link
Contributor

After last changes it seems to not work anymore.
All liquids are infinite, settings in config doesnt change anything.
Moreover digging in water gave me a few water source and flowing water nodes.

@proller
Copy link
Contributor Author

proller commented Feb 13, 2013

its optimization like PilzAdam suggestion.
now i make it adjustable, few minutes of test and i will commit..

@RealBadAngel
Copy link
Contributor

if you added to it infinite sources again then whole idea is fucked up and theres no point mergin it.
I just carved a huge cave under a small lake and water level havent changed even by 1 milimeter.

@proller
Copy link
Contributor Author

proller commented Feb 15, 2013

reducing new under ocean bubbles: https://github.com/celeron55/minetest/pull/466

@MirceaKitsune
Copy link
Contributor

I didn't test this yet or understand exactly what it does. But from what I can tell, it's a very good idea! I can think of many ways it can go wrong however. If it does work, then please do add!

@Uberi
Copy link
Contributor

Uberi commented Feb 16, 2013

Are infinite sources still possible with finite liquids enabled in survival mode?

@proller
Copy link
Contributor Author

proller commented Feb 16, 2013

now you can place water_source with last bit=1 like param2 = 128
and block will be infinite.
in any mode

@Uberi
Copy link
Contributor

Uberi commented Feb 16, 2013

I might have misunderstood, but how would one obtain such a water block in survival mode legitimately (i.e., without /give or /giveme)

@proller
Copy link
Contributor Author

proller commented Feb 16, 2013

now only with lua mod or core mod

kwolekr pushed a commit that referenced this pull request Feb 26, 2013
@kwolekr kwolekr merged commit 979ca23 into minetest:master Feb 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants