Skip to content

Fluid/Gas System #62

Open
Open

Description

@IntegratedQuantum

Fluids and gases should be stored and simulated outside the normal voxel volume.

Goals

  • heavy liquid should flow downwards
  • light gases should flow upwards
  • biomes should have an associated liquid/fog block. Whenever a block in that biome is broken, the gap must get filled with the right fog/fluid block
  • Fluids/Gases should exist in seperate memory to allow for underwater fences and similar
  • Fluids should not propagate endlessly, flooding the entire world

Relaxations

  • fluid volume does not need to be preserved
  • the flow does not need to be realistic
  • big bodies of water like the ocean can be assumed as infinite, as long as they don't flood the entire underground

Activity

  1. added
    enhancement
    experimental
    on Sep 17, 2023
  2. ikabod-kee commented on May 26, 2025

    @ikabod-kee
    Collaborator

    Image

  3. IntegratedQuantum commented on May 26, 2025

    @IntegratedQuantum
    MemberAuthor

    We cannot mix gases like on the left, since this will create an exponential amount of gas types.

  4. Argmaster commented on May 26, 2025

    @Argmaster
    Collaborator

    Oxygen not included has a gas system which I believe allows only one gas type per tile, what we could have would be similarly constrained I think. Are there any other games with similar systems?

  5. archbirdplus commented on May 27, 2025

    @archbirdplus
    Contributor

    We could write gases as vectors (smoke, cloud, poison, ...) as long as we

    • control their proliferation (unlike rotation modes)
    • decide their color in O(d) time/space using maths instead of lookup tables
  6. IntegratedQuantum commented on May 27, 2025

    @IntegratedQuantum
    MemberAuthor

    Mixed gases are also problematic since every border between different gas color/density needs a transparent face, which makes every biome with mixed gases a lag biome.

  7. archbirdplus commented on May 27, 2025

    @archbirdplus
    Contributor

    Then we could have fluid glob together at a uniform density to reduce the number of faces to render. If they glob independently then we only have to deal with O(liquid dimensions) faces. We could also assign several levels of fluid to the same transparency to have the same dynamics without adding extra faces.

  8. IntegratedQuantum commented on Dec 13, 2025

    @IntegratedQuantum
    MemberAuthor

    another approach was mentioned in #2388

  9. tillpp commented on Mar 23, 2026

    @tillpp
    Contributor

    is there a concrete idea now you guys have settled in?
    otherwise i would recommend my beloved hierarchical node approach here, even though it is more complex.

  10. IntegratedQuantum commented on Mar 24, 2026

    @IntegratedQuantum
    MemberAuthor

    No, it's all open until someone puts in the effort to see how viable a given approach is (which is why this issue has the experimental tag).

  11. GeraForever commented on Mar 24, 2026

    @GeraForever
    Contributor

    cubyz fluid system should be a bunch of chess games played by bots stacked on top of each other where white is water and black is lava or smth

  12. pgattic commented on Apr 8, 2026

    @pgattic

    I found a cool article about fluid simulation. Don't know where we store articles but I thought I'd share it here in case it's noteworthy https://lisyarus.github.io/blog/posts/simulating-water-over-terrain.html

  13. TyrrelMeter commented on Jul 27, 2026

    @TyrrelMeter
    Contributor

    Will gasses/liquids be able to have varying density?

  14. IntegratedQuantum commented on Jul 27, 2026

    @IntegratedQuantum
    MemberAuthor

    liquids have varying density

  15. added
    needs design decision
    on Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineenhancementexperimentalneeds design decisionphysics

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions