Fluid Mechanics

Discussion in 'Mechanics' started by McMagnus, Jan 2, 2016.

  1. McMagnus

    McMagnus Void-Bound Voyager

    Hello,

    So I have seen this posted on (last post was early in 2015) but I haven't seen it commented on by devs.

    Fluid mechanics: they suck. Don't get me wrong, this game is great, which is why I was totally shocked to see water chasing me up the hole I drilled through the center of an island. I get how complicated this issue actually is and, unfortunately, I don't currently have much in the way of suggestions on HOW to remedy it.

    My initial thoughts on this might help to remedy ONE issue on oceanic/fluid type planets.
    • If planet type is oceanic (I don't think there are oceanic planets without an atmosphere, otherwise, after this check, a check would need to be run to see if the planet has any atmosphere)
      • True: If water at block is pathable to max elevation (or sea level + some amount; top of the world is REALLY high)
        • True: Standard fluid mechanics (non-pressurized)
        • False: Pressurized cavity
          • Easy Option: Stop water rising it's level equals the Y value of the higher side of the opening (higher of the block on the left or right side of the cavity)
          • Hard Option: Do some calculations, taking into effect elevation, gravity, volume of cavity, temperature, and the density of the atmosphere and fluid. You might could make this simpler and just account for elevation and gravity. I'd offer specifics, but I will have to crack open my physics book...
      • False: Standard fluid mechanics
    Don't know if this is doable since I don't know much about this game's inner-workings yet. Also, it would be less realistic because if a player dove to the bottom of the ocean and dug down, left/right, then up to create a cavity, it would contain no gas and really would fill up with fluid...but anyway...

    A couple of un-related notes and suggestions. I enjoyed discovering the biome waaaay up high when I was checking to see if there was indeed a max elevation. Props to whoever thought of and implemented that. Any chance you guys could kill weather above a certain height? Maybe include a max cloud layer and above that, no weather? Kinda breaks immersion.

    I would suggest accounting for gravity and jump height when players get crazy high. This decision really should be by a poll to the playerbase though.

    Finally, here's a Wikipedia link to the only floating island: https://en.wikipedia.org/wiki/Great_Pacific_garbage_patch. Bottom-line: Islands don't float. Not sure why they do in this game...

    Sorry if this seems harsh - just trying to help. Thanks again for the great game!
     
    General Nuclear likes this.
  2. Derpislav

    Derpislav Big Damn Hero

    I might be wrong, but I think fluids already work like that. Every series of connected tunnels I've had filled with water had equal water levels everywhere, after some time of "settling" of course. Neither has ocean water followed me above the ocean level. Can you please clarify this a bit?
     
  3. McMagnus

    McMagnus Void-Bound Voyager

    You're absolutely right - the ocean water will follow you on up to ocean level. That is my complaint. As shown in the picture below, the cavity I'm standing in is pressurized - no air can escape. This means that the water should only rise a little and then stop, but that's not what happens. The water keeps rising. Now in the situation where the cavity is NOT pressurized (if I removed the cobblestone directly above me, there would be a path to the surface), the water probably would continue to rise until it reached ocean level.

    water2.PNG
     
  4. Fantango

    Fantango Space Penguin Leader

    You appear to be on an iceberg... icebergs float... not sure why you want magic air pockets to appear but floating icebergs are too unrealistic for you...
     
  5. Derpislav

    Derpislav Big Damn Hero

    1. It is an iceberg. Except most islands in the game aren't and they still float.
    2. In this case, it would be a magic air pocket out of nowhere, but if you build one first, and then floor the area, the water will still displace air through some unknown, physics-breaking means.

    It would be hard to improve on this without gas simulation, but one way would be (I'm not a coder, the largest piece of programming I did was... a HTML page) to make the liquids engine take one of the cavity size above the water's point of entry, then dedicate a set fraction of tiles to water, stopping it from flooding it once it reaches that. This would be probably horrible at dynamic calculations during mining or multiple tunnels connecting, or even outright impossible to code, but hey. Input's input.
     
  6. Fantango

    Fantango Space Penguin Leader

    I think everyone would be just as annoyed to have islands that realistically emerged from the ocean and ate up a chunk of the sea floor. Then people would ask them to be called "Island planets!" then after that people would ask for ocean planets to be put in the game and when they put in ocean planets again (with no islands) people will suggest putting in islands because pure ocean is boring and finding an island is exciting. Terraria has sky islands, why can't Starbound have islands floating in the ocean?

    The problem is that water is pressurized and air is empty space. If you make air as dense or more dense than water then there's never any flooding. If you make it less dense or empty then you get water trying to fill it constantly. Realistically, if you're in an ocean (which is pressurized) water will go up a shaft until the air in the shaft is pressurized to the same degree as the water and since air is empty in this game, well, you get flooding from below... Taking the cavity size above water's entry point IS gas simulation. You've just mapped where the gas is and crudely assigned a pressure value to it depending on if it's an open or closed system... assuming you can actually map it properly across loading boundaries...

    Messing with the system for special cases is a recipe for bugs... but I mean, the system could just treat any air blocks above it as solid... you could never squirt water upwards, but you wouldn't drown. You could turn off pressure all together and give it simpler unrealistic mechanics since most players really don't use the pressure much, but I doubt they'll cut a system they love to prevent a few drownings.
     
  7. Frost Spectre

    Frost Spectre Big Damn Hero

    Essentially Air itself would have to become another liquid (And it does act like it in real life, with even lighter gas piling up on top of it and so on, well gas being just very thin "liquid").
     
  8. alvintopo

    alvintopo Space Hobo

    Rx marine as a chemical manufacturing company catering exclusively to the needs of the marine industry.In a short span the company has established itself as one of leading wholesale suppliers of a wide range of chemicals for -Marine industry internationally- and other local industries and plants .our client list bears testimony to this. Rxsol brand has its own manufacturing strength. It provides wide range of maintenance tank cleaning water treatment other chemical range

    Degreaser

    http://rxmarine.com/Natural-Blue-Biodegradable-Cleaner-Degreaser
     
  9. General Nuclear

    General Nuclear Supernova

    pumice rock floats which is a volcanic rock type you can actually make a almost unsinkable boat out of it if you wanted to.
    and yes large naturally floating pumice rocks have been found floating in the ocean.

    [​IMG]

    Anyway i find it highly annoying that the air pockets fill up when i am mining and yeah i know its illogical to assume air would magically form out of no where.
    But i would like to get a item to help us fill the holes we are mining with air so it would be easier to mine also in case you to make a underwater house or city.

    So far the only way to do this is to make this is to make solid block and wall then mine the inside then also the only way to get inside is by making a tube that gos over the water surface.
     
    Last edited: Jan 7, 2018

Share This Page