Author Topic: Realistic water?  (Read 816 times)

You know, when you build a house then you go into the environmental settings and turn on the water, it just fills water in the house?
Well, could it be possible so that the water goes around your house? good for making underwater bases?


An alternative would be a zone brick that "erases" the water it's overlapping. I don't know how that would even work though.

are you implying we make particle water physics in blockland

are you implying we make particle water physics in blockland
No, he's saying water shouldn't be inside closed rooms. It's pretty obvious.

An alternative would be a zone brick that "erases" the water it's overlapping. I don't know how that would even work though.
If this is possible, then doing it automatically is possible.
An automatic water zoning script.
Call it something catchy...
How about AutoZone?

In all seriousness, it would be possible, but the only way I can think of doing it would be pretty intensive, at least while you're building/editing water levels. Whenever a brick is placed, it would have to send impulses out in all directions at all plate heights it occupies. If it encountered nothing, that location would start as a single plate of volume attempting to find bounds. At any time, if an impulse fired from it could travel further than say 64 blocks unperturbed, the air pocket would fail, the process would stop, the bubble would burst. However, if resistance continues to be found, the plate of volume before each collision could be added to the bubble. This process will automatically balloon it out to fill the entire area. The possible hangup with this is, as far as I see it, not having much experience with this kind of thing myself, is that it would be intensive to deal with that many raycasts(?impulses?whatever.)
Anyhoo, each time a block is hit by a bubble impulse, it would be added to a set of bounding blocks for the bubble. If any of a bubbles' bounding blocks are changed in a way that could effect water (such as a brick being destroyed or a door opening) the impulse/expansion process would have to repeat.
The bubble's interior actually does need to be stored along with its bounds and it should probably be defined as eloquently as possible. I believe somebody once made a script to prevent spam by combining adjacent blocks whenever possible. An interpretation of this would be necessary to divide the bubble into the smallest number of rectangular solids possible. The locations and dimensions of these would be used to set up zones that negate the effect of water. In the event of the burst of a bubble, these would have to be destroyed.
« Last Edit: November 05, 2015, 02:57:07 PM by Katadeus »

The water that the environment settings use is a very bare bones waterplane class with little functionality, just an infinite plane with no definable dimensions other than height.

I want to say I remember it having some very limited functionality to constrain the water to an area or delete sections of it... but either it was only half functional (like it was visually gone but still physically there), or maybe I'm thinking of terrain; I know you could delete sections of that.


It would be easier to expand the capabilities of water bricks to include this

As long as your rooms are square (and you don't need automatic detection of closed rooms), you could tile water planes and physical zones around them. The algorithm could probably even be implemented in torkscript.

But the engine doesn't give us anything to make many small water planes, and placing physical zones next to each other doesn't work well either...

If it isn't possible to disable the effects of water on the player, is it possible to simply negate them?

This s an interesting take.  I really would like to see this happen.

If it isn't possible to disable the effects of water on the player, is it possible to simply negate them?
not likely. airswimmer mod puts a 0 grav low-viscosity water zone around the player, but there is a noticeable decrease in movement speed once you go underwater with it on, even though visually you still see as if normal, and still have 0 grav applied onto you (underwater, the airswimmer 0 grav prevents you from floating up to the surface of the water)

If it isn't possible to disable the effects of water on the player, is it possible to simply negate them?
Not with torkscript.