niels747 / 2D-Weather-Sandbox

Two-dimensional, realtime, interactive simulation of earth's troposphere.
https://niels747.github.io/2D-Weather-Sandbox/
GNU General Public License v3.0
81 stars 27 forks source link

Fire Allows the Creation of Caves #121

Closed RobbyMski closed 2 months ago

RobbyMski commented 4 months ago

Was working on simulating a volcano when I discovered this. I do think it would be a neat feature to be able to create caves or overhangs without setting the world on fire. Because if you remove the fire (or once the fire burns out) the land will just fall down again.

Screenshot 2024-03-11 at 09-02-45 2D Weather Sandbox

niels747 commented 2 months ago

I havent been able to recreate this. Did you modify the code to get this? I might add actual lava in the future

RobbyMski commented 2 months ago

I didn't modify any code. But I should have mentioned that I was using the landscaping tool to carve out the shape of the volcano.

Screenshot 2024-05-05 at 10-09-44 2D Weather Sandbox

Screenshot 2024-05-05 at 10-11-04 2D Weather Sandbox

As long as there is fire, you can carve out/delete the ground underneath it using the landscaping tool:

Screenshot 2024-05-05 at 10-10-59 2D Weather Sandbox

Screenshot 2024-05-05 at 10-11-04 2D Weather Sandbox

Using this bug: You can also create a floating island. One thing to notice is that when you delete the ground underneath it, it will also be on fire.

Screenshot 2024-05-05 at 10-39-13 2D Weather Sandbox

Screenshot 2024-05-05 at 10-39-18 2D Weather Sandbox

Until it burns out: Screenshot 2024-05-05 at 10-41-03 2D Weather Sandbox

Screenshot 2024-05-05 at 10-41-08 2D Weather Sandbox

Recreating this again: Screenshot 2024-05-05 at 10-45-45 2D Weather Sandbox

Screenshot 2024-05-05 at 10-45-53 2D Weather Sandbox

You can't place land above the fire:

Screenshot 2024-05-05 at 10-46-14 2D Weather Sandbox

Screenshot 2024-05-05 at 10-46-26 2D Weather Sandbox

Otherwise it will fall through the earth and put it out:

Screenshot 2024-05-05 at 10-46-52 2D Weather Sandbox

Screenshot 2024-05-05 at 10-46-48 2D Weather Sandbox

But if you place land underneath the burning fire. It won't pull the ground on fire above it down.

Screenshot 2024-05-05 at 10-47-04 2D Weather Sandbox

Screenshot 2024-05-05 at 10-46-59 2D Weather Sandbox

What I think is going on (although I'm not a programmer) is that the fire is programmed to also fall similarly like the land tool does when it touches vegetation (you can see this if you go into temperature view and watch the orange bar fall to the ground when you set the land on fire). But when "fire" sets the "land" on fire, the "land" is no longer "land" it's technically something else (I'll call it "Fireland"). "Fireland" isn't programmed to fall down, so you can delete the ground underneath of it to create caves and such. But once the "Fireland" burns out, it turns back into regular old "land" which is programmed to automatically fall and fill in the air beneath it (that's my best guess anyway).

One thing I would like to see (and it would probably be required anyway if you're thinking about adding lava) would be a way to stop the land from automatically filling downwards once you place it. This would allow you to create overhangs and caves and such. There are a couple problems that will need to be solved though: How does the land know whether or not the air beneath it is air and not a part of some cave system? Maybe you can create some type of tool that swaps air out for something completely identical; but if land detects it, it won't go through it? Probably won't be trivial though because if land was falling through the "fireland" then it's probably just programmed to overwrite anything placed beneath it. Another more simple idea would be to just remove the ability for land to fall in the first place. I don't know how this will affect terrain generation though, and it would also make creating hills and sharp inclines a little more annoying; but the idea of underground caves filled with hot water/lava with a vent at the top to simulate hot springs/geysers, or just the wacky idea of floating islands and how they would affect the jet-stream, sounds too fun to pass up on.

Curious on your thoughts and whether you can recreate this bug or not @niels747

niels747 commented 2 months ago

Hi, sorry for the late response. I recreated the bug and it's indeed how you said it: the fireland wasn't programmed to fall down like the normal land does. I fixed it now, but this did inspire me to add actual caves in the future. That will however come with some additional challanges, like IR coming down from the ceiling of the caves and proper boundary conditions in all four directions. You have very good insights for a non programmer! Thanks for reporting the bug!