Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Mixing lava, water, and ice mechanics  (Read 617 times)

uncool

  • Bay Watcher
    • View Profile
Mixing lava, water, and ice mechanics
« on: July 12, 2011, 02:17:47 pm »

So I'm getting some weird results when I'm mixing lava, water and ice in general. I've tried 3 different situations and gotten results I can't yet figure out.

Situation 1:
See http://www.bay12forums.com/smf/index.php?topic=87141.0

When the water spreads (as explained there), it turns into ice, so just before getting the obsidian, we have 1/7 lava on top of 7/7 water.

Situation 2:

When a ghost opened a hatch from my ring of fire over some built ramps, the lava spread. I got the same result as in situation 1, as far as I could tell (I didn't notice it in time to observe it over time).

Situation 3:

I decided to test what would happen if I opened a hatch and closed it very quickly. The final result was that there would be 5/7 lava on top of 7/7 water near some ice. I stepped through, and stuff happened as follows:

1) The ice melted (within 4 or so ticks)

2) Steam appeared where the lava was.

3) The lava disappeared, and the water below it turned to obsidian. Note: There had been stone on top of the ice beforehand; the stone got trapped in the new obsidian, and it still appeared there afterwards.

4) The 4 corners of the area melted (that is, they melted in an x pattern)

5) Above the 2 uncovered corners of the x, 2 water appeared each.

6) The water spread, and then turned to ice.

Anyone have any idea how this is supposed to work?
=Uncool-
« Last Edit: July 12, 2011, 02:20:12 pm by uncool »
Logged

Dorf3000

  • Bay Watcher
    • View Profile
Re: Mixing lava, water, and ice mechanics
« Reply #1 on: July 12, 2011, 03:19:01 pm »

Ice is pretty buggy unpredictable, so I don't think anyone can say for sure what will happen when you mix it with lava.

I do know that you can't remove glacial ramps from an area that will melt, or you'll be left with completely impassable tiles with no material.
Logged
I had a tigerman get elected mayor and he promptly mandated 3 bowls of cereal.

uncool

  • Bay Watcher
    • View Profile
Re: Mixing lava, water, and ice mechanics
« Reply #2 on: July 12, 2011, 05:31:51 pm »

Ice is pretty buggy unpredictable, so I don't think anyone can say for sure what will happen when you mix it with lava.

I do know that you can't remove glacial ramps from an area that will melt, or you'll be left with completely impassable tiles with no material.

In that case, I guess I'll work on the !!Science!! here, as I'm in an ideal location. I'm just wondering if the "pop-up" effect (step 5) is supposed to happen here; it makes no sense to me.

ETA: I think I might have figured out at least one of the ways the mechanics might work here.

So there are several points to this mechanics:
1) When ice melts
2) When ice refreezes
3) How lava and water flows mix

So 1 in most situations is pretty obvious - whenever there is lava within 1 square of the ice. However, when actual mixing happens, I've been seeing some weird stuff - in general, when lava is on top of ice, first ice melts, then the lava falls and mixes, and 2 ticks later, the corner-connected ice squares melt. From this, I think that I can get the following:
1) As soon as lava hits a square, whether or not it's about to mix, every ice square around it gets a "melt" signal (or, in more temperature terms, warms up).
2) When lava and water mix, the squares that are side-connected to it lose the melt signal (or lower their temperatures enough not to eventually melt), but the corner squares retain that signal (or stay warm enough).

The next phenomenon to explain is the "popup" effect. The only explanation I can think of is the following:

When lava and water meet, they form obsidian, but the "total fluid" count must stay there (although it seems to decrease by 1; I plan on testing this more extensively). Then when melting happens at the corners, this "flow" goes to other squares, which in turn "overflow" and pop up.

That's the only thing I can think of, and I'm thinking it doesn't quite work as I have said, but it's the only thing that makes sense to me so far.
=Uncool-
« Last Edit: July 12, 2011, 09:42:51 pm by uncool »
Logged