Water and Building Interaction Bug

Summary:
For my 22.5 water test, I decided to play a Normal Ascendancy game, and focus entirely on building a functional aqueduct system from a mountain lake source and use it to fill a moat. With the aqueducts built and the moat dug, I popped the last voxel and out the water shot. Sadly, the water failed to fill up the first elevation of aqueducts and spill down to the next. I watched and waited for 5 actual minutes of game play in case it just takes time to fill, and the state of the water remained unchanged. Perhaps I found a bug?

Bonus: As you’ll see in the video below, the water animation appears to play through the terrain and into the X-ray view. Maybe worth some optimization to restrict that to displaying above ground only.

Steps to reproduce:

  1. Play the game normally.
  2. Construct a stepped aqueduct from a higher elevation and attempt to use buildings to move the water down.
  3. Observe the water failing to fill on top of structures, and falling as you’d expect.
  4. Observe the condition persist after reloading the game (as seen in at the 4 minute mark in the video)

Expected Results:
Water properly cascading over structures and terrain and following at least the basic laws of fluid dynamics.

Actual Results:
Aqueducts that never actually fill up.

Video:

Attachments:
Save: megashub-A22.5-761-water-building interation bug.7z (3.8 MB)

Version Number and Mods in use:
0.22.5.761 (x64) Vanilla

3 Likes

well seems to be working for me anyway, but then I got this bug

I think the problem you are having is that you need a bigger hole for the water to move a longer distance over flat ground. as when I started with only a single block below the water line it only went half way to the edge of the cliff

release-761 (x64)

…hearth/services/server/hydrology/channel_manager.lua:579: assertion failed!
stack traceback:
radiant/modules/common.lua:245: in function ‘report_traceback’
radiant/modules/common.lua:256: in function <radiant/modules/common.lua:250>
[C]: in function ‘assert’
…hearth/services/server/hydrology/channel_manager.lua:579: in function ‘get_waterfall_channel’
…hearth/services/server/hydrology/channel_manager.lua:495: in function ‘add_waterfall_channel’
stonehearth/components/water/water_component.lua:307: in function ‘_grow_region’
stonehearth/components/water/water_component.lua:216: in function ‘add_water’
…arth/services/server/hydrology/hydrology_service.lua:466: in function ‘_process_water_queue’
…arth/services/server/hydrology/hydrology_service.lua:393: in function ‘_on_tick’
…arth/services/server/hydrology/hydrology_service.lua:54: in function ‘fn’
radiant/controllers/nonpersistent_timer.lua:56: in function ‘fire’

radiant/controllers/time_tracker_controller.lua:86: in function ‘set_now’
…hearth/services/server/calendar/calendar_service.lua:421: in function ‘_on_event_loop’
…hearth/services/server/calendar/calendar_service.lua:46: in function ‘instance’
radiant/modules/events.lua:291: in function <radiant/modules/events.lua:285>
[C]: in function ‘xpcall’
radiant/modules/common.lua:265: in function ‘xpcall’
radiant/modules/events.lua:285: in function ‘trigger’
radiant/modules/events.lua:398: in function ‘_trigger_gameloop’
radiant/modules/events.lua:446: in function ‘_update’
radiant/server.lua:61: in function <radiant/server.lua:58>

here is my save
1505027458921.zip (3.6 MB)

2nd attempt





ah I see the problem now.
the water calculation and animation doesnt seem to update with interactions of player placed blocks?
image
1505029766699.zip (4.5 MB)


looks confirmed to me

after some more experimenting it does seem like you can make a temporary vessel for the water to fill in, and then you can open it so that it goes down yet another level, but you cannot put a stop in between the original container and the destination once the water has begun to flow. if you did not dig a big enough container then, the only option you have is to dig a bigger one- right now. so my advice would be to transfer the water in sections, allowing it to equalize on either side before destroying a stop block and letting it drain.
image




1505032136981.zip (4.7 MB)

1 Like

I’m actually wondering if the problem isn’t that the current calculation is trying to determine the destination volume as a whole, and since one side of each segment of aqueduct is open, it calcs the container volume incorrectly.

I wonder if simply filling each empty voxel and then looking at each adjacent voxel for empty space to fill into might solve it. As long as the source flow continues, the chain reaction would continue. Like it does in reality.

@Albert am I over simplifying?

1 Like

@megashub Great video showing the bug. It’s now on my queue to fix.

@genboom Your last post is correct. Adding a block that bisects an existing water body will not actually split it, and the water body will still be connected through the added block. It’s a use case / feature that I haven’t implemented yet but is scheduled for the next round of improvements.

Thanks guys for the great posts!

Albert

7 Likes

I’m guessing that when water is done there won’t be permanent puddles like the ones I created?

Which makes me think that there should be a full weather system implemented for it to really make sense. The water that puddles evaporates and when the rain comes in it adds a set volume of water over an area. this would make a town built around water collection really satisfying especially if water becomes required for farming.
I’m looking forward to the water updates

1 Like

@genboom The puddle should evaporate slowly if the source is no longer feeding it with water. In the long run, we’re still looking at alternatives to the current puddle formation behavior.

1 Like

Are persistent water sources (mountain springs etc) on the roadmap for water, as well?

2 Likes

aesthetically it would probably look better if the puddle wasn’t so circular and the blocks colors were darkened and only a few puddles near or around the source would be visible, not sure how you would go about doing this tho

@megashub Yes, this plan is for lakes to have an equilibrium water level. When the water level is below this, the lake will refill naturally allowing you to use it as a permanent water source.

3 Likes

We’re considering having it flow as a river instead of creating a puddle. Don’t quote me on that though.

2 Likes

:stuck_out_tongue:

how would that work? flow to the nearest block 1 elevation below? seems like that could be very unpredictable, but maybe not I think minecraft did something similar

I’d probably use the terrain topology to construct a continuous gradient field (i.e. a map of what downhilll means at any particular point) and then flow the river along the gradient with aesthetic constraints on when to make 90 degree turns. That’s an initial idea anyways.

4 Likes