Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Qyubey

Pages: 1 2 3 [4] 5
46
MORE SCIENCE!
This time with accidental dwarf drowning~

Upon re-embarking to my test fortress, all of those fresh water tiles sitting adjacent to the salt water ones became salt water again. The only ones that did not were the water tiles sitting directly inside the aquifer I had mined out. Seems to imply that for each tile, there's some kind of trigger that switches it from containing 'salt' water and 'fresh' water, and that flag reloads upon map load. As for why it managed to over-write with salt water, probably has something to do with the tile type and its connection to open ocean. All tiles on Conglomerate turned salty, and all tiles on Dolomite turned fresh. When I separated some fresh water using a floodgate, it still become salty upon re-entry. Probably means its tile-dependant.

This definitely leads me to believe when salt water flows onto a tile that spawns regular water, it triggers it to be a 'salt' tile, and vice versa for when regular water flows onto a tile that naturally spawns salt water. These values are refreshed upon map reload, so water can spontaneously alter its salt content.

Stagnant water appears to do a similar thing and just become regular water when the map is re-loaded, even when its sitting on a murky tile. I'm assuming it only remains stagnant if the pool itself is unbroken. Curiously, this implies the check for stagnant water is not a cellular one, but rather examines the entire pool of water before assigning whether the water is stagnant.

So if you want a pool of always-fresh water, just channel out a single tile adjacent to a stagnant water source, then save and reload - BAM! The water is perfectly pure~

Water purification is so easy.

EDIT: This only appears to happen on ocean zones.


Also fun- DROWNING!

I made a small, functioning fortress at the beach, complete with a little fresh water well that dug into an aquifer. However, upon reloading, several levels of my fortress spontaneous filled with water and ended up drowning a few of my dwarves. It shouldn't have had the pressure to rise up the single z tile to the well, so that couldn't be the case. So what was it?

After examining the after-effects, I think I know what happened and I believe it's a quirk of salt water/ocean tiles. Whenever the map reloaded, any tile that was designated as naturally salt-containing and contained any amount of salt water resulting in it filling up to a 7/7 volume. This does make some sense; it allows the ocean itself to be completely full whenever the map reloads, as you would expect it to be. However, as a byproduct of this workaround, any salt water tile - even if it can't path to the ocean, even if its a 1/7 puddle of water - so long as its somewhere above a conglomerate or other 'naturally salt water' tile, it will refill both itself.

Yes; Salt Water will sponteanously refill itself when it is above a Conglomerate Floor upon map reload.

I tested this by channeling out 6x3 room above some of the flooded conglomerate tiles, and yes, upon reload they spontaneously were filled with water. This effect likely happens at every tile up to sea level. Incredible.

Curiously, when salt water isn't on congomerate tiles, it doesn't experience this effect. Possibly it even gets deleted. I imagine it's likely limited to only tiles that are considered to be ocean floor. Hilariously, if you tile out a conglomerate floor and dump some salt water on it, it ALSO will fill to 7/7. Manual flooring does it too!

Salt water also appears to be deleted from tiles that are not conglomerate, probably some kind of 1/7 water removal thing. I wonder if salt water at 7/7 above regular tiles would turn into fresh water? The aquifer tiles appear to have done that. I don't know if I can say that with certainty yet though. Probably won't test further though.


I lost about 4-5 dwarves to this little science experiment. Sudden drowning is a curious thing.

47
DF General Discussion / Re: Future of the Fortress
« on: September 04, 2016, 07:52:40 pm »
Oh, thought of another one:

Will civilizations ever own artifacts? I know bloodlines can, but I mean like governments/institutions controlling art; the Mona Lisa in the Louvre, for example. On that note, will we ever have procedural flags, anthems, or dances that are unique to/associated with a civilization? Can you play someone the song of your people? I could imagine playing a national anthem for people that are currently at war with that nation would probably result in a bar fight.

48
Another buggy thing about salt water: Making it pass through an u-bend turns it into regular water. No need for screw pump or fresh water source.

Regarding the brook, I think part of the reason for that implementation, and not just 1-4 units of water flowing off map is fish in it.

Yep, sounds legit considering how that system works. U-bends only teleport liquid units, so it wouldn't transfer a SALT flag to the new tile, or whatever. I'll bet it'd also decontaminate murky water.

Nah, the brook system is actually fine. I don't have a problem with it - it's a bit cheaty, but it functions well enough. If I were to do brooks in a fluid body system, I'd probably keep the flow rate really low and spawn in the initial tiles at a 2 or 3 unit height. Hopefully if you could equalize the rate at which fluid enters, exits, and drains to each tile, then you could simulate a stable, low-volume, slow-flowing river. That's the ideal concept, but probably veeery difficult to get stable.

Another option might be to make it a special fluid body that can only fill to a 2 or 3 unit volume - hard-lock it. But then you'd have to deal with it being overwritten by regular water and so forth. Would need more workshopping of the idea to make it work.

EDIT: Oh- OHH. FISH. Riiiight, now I understand; Fish can only move around in water that is 4 and above. Huh... that's a problem too.

49
Upon examination, the fact that water in this game uses averaging between two random tiles makes the flowing water make SOOOO much more sense! It's why pools take forever to drain; they literally can't flow faster than 3 or 4 units per tick into an open square, then the square after that has to half again, and again. The speed of water calculations only masks the fact that the flow rate is abysmally slow; you can really see how slow it moves when you stretch it out over a lot of tiles - or even comes to a near-complete stop. Given that it seems to consider open air and a 1/7 tile of water as equally promising, you can very quickly see a 'blobbing' effect to water in the game.


So aside from good ol' water, there's a few sets of special circumstances that affect water in the game:
  • Brooks, flowing water which can be walked over.
  • Murky water, which arises from a 'Murky pool' ground tile.
  • Salt water, from oceans, seems to have a similar concept.

Turns out brooks are more of a workaround; a 'Brook' is actually a special floor tile that you can walk over, but still allows liquid to pass, like a floodgate. When testing Brooks, I found that the water inside was regular water, not special in any way. Channels containing it we impassable by dwarves, unlike the brook; they had to walk onto the 'Brook' tiles to get to an area I sectioned off via channeling. Not much to say here, since Brooks are more of a cheat way of making water streams you can walk across. The water is ordinary.

Murky and Salt water are far more interesting.



Murky status for water persists, even when it flows onto regular tiles again. If drained, any water that arises to fill the pool is also murky. Seems to imply water-containing tiles can inherit properties from other tiles, and spread them as they flow. All the better for a liquid body system~

'Murky' is considered a contaminant, and can be removed with a screw pump (this process is probably just deleting the murky water and spawning regular water at the end of the pump).

When regular water from the brook attempted to average between Murky and regular water, it left both tiles as regular, deleting the contaminant. However, dumping fresh water from a bucket into stagnant water does not produce this effect, it remains stagnant. Speaking of buckets; Buckets maintain their contamination status when they are dumped. Stagnant water stays stagnant, fresh water stays fresh.

When fresh water is dumped into a hole, then allowed to mix with murky water, all of the water turns fresh - effectively purifying it. It likely does this to avoid polluting an entire river.

At this point I'd like to note that if Fluid Bodies were used, you could measure contamination levels within an entire body and avoid this problem. If fresh and contaminated water mix, it averages the contamination across the bodies, so when they separate they would then have half and half contamination. Same for salt levels, speaking of which...



Time to hit the beach... for SCIENCE!

...

...Huh. Salt water is... strange. For one, when exposed to fresh water, salt water and fresh/murky water will refuse to overwrite the other. They actually WILL still share though! Seriously; although each tile remains static in whether it is 'Water' or 'Salt Water', they do appear to exchange units of liquid - effectively meaning that if you create a small hole next to the ocean, dump fresh water in there, then connect it to the open sea, you will have an infinite supply of purified water. No need for a screw pump.



Who the fuck needs Desalination plants!? Not dwarves, that's for damn sure. My guys were kicking back on the beach, drinking salt water filtered through nothing but a few drops of stagnant water

Which also seemed to spontaneously de-contaminate itself for some reason...



I also dealt with Aquifers at the beach. It seems like they fill adjacent tiles with the same system; open tiles fill with 3/4 units of fluid, so the aquifer rock is treated as a 7/7 tile that cannot be depleted. I connected an Aquifer-flooded tunnel up to salt water (pouring down the stairs) and interestingly enough, once the salt water touched regular water, it refused to 'claim' any more tiles as salt water. They were all signified as regular water.

I performed a repeat test to be sure, this time letting the salt water flow in before I triggered the aquifer. I'm sure Urist appreciated the gravity of his contribution to the field of dwarven water physics whilst he mined out an aquifer in an already-flooding room. The previous result seemed to be a fluke; salt water could claim tiles just as easily as regular water, it's just random to see if they 'jump' on a tile first. Also produced the same result: salt water and fresh water can exchange units, but cannot overwrite one another. Curious. My next thought would be to drain out regular and salt water tiles to see if they retained those values when fluids were removed - although that would take a lot of time and I feel like the answer is 'No'.


This is literally what it looks like.



So... on closer inspection, water physics are even more fucked than I had anticipated. Some of this stuff might even be worth adding to the wiki, regarding how the liquids interact. I'd really love to see how salt and murky water interact with lava, but that's an elaborate thing to set up so I'll leave it be.

Now, to figure out if Fluid Bodies could solve these problems...

50
Did some more reading on the wiki and some experimentation ingame with the current water system.

Seems that it uses an averaging system for tiles of 2/7 and above, between that tile and anything around it that is either open space or contains a liquid. I'm guessing what happens is any tile containing water more than 1/7 will seek to flow, so it will grab a random tile around it and find the average of the two (so, 1/7 for both). Curiously, due to the fact that it decides this randomly, you can get situations where a 7/7 tile flows into the same tile twice:

Spoiler (click to show/hide)

Might be a bit difficult to explain, but I've created two instances of 7/7 water here. The top one spread out into that 3x3 area adjacent to the NW wall. However, what proves that it randomly chooses a tile is the fact that it managed to place a 1/7 puddle outside of that 3x3 area. Which means it must have transferred 2 units of water South of its original tile, then transferred one of those units to the tile SW of that. Marked the path with a red arrow. Each frame, it must just grab a random adjacent tile and average them; the flow seems too fast to be transferring liquid one unit at a time.

The other time I've managed to pause before it completely spread out. My cursor is north of the origin spot, marked with a yellow dot, so you can see that two units have definitely been transferred north. After I unpaused it, the water averaged itself with the tile to the NW, also jumping out of the original 3x3 possible area.

Magma seems to follow the same rules, but does so at a far slower rate. Even within my small test of making two 7/7 blocks of magma, I noticed the inefficiency. A block of 2/7 magma to the north of the mass, which bordered 3 open spaces, actually transferred it to an empty space SOUTH of the puddle - meaning it must have averaged itself back south instead of logically flowing north into the open space.

Testing in a 4x4 space with 27 units of water (7,7,7,6) definitely shows that the 6/7 block and one of the 7/7s attempt to average each other. When entirely filled with 7/7, no motion seems to occur but it's impossible to tell, after all, it could still be attempting to average itself. However, I'm guessing 1/7 and 7/7 water can both act as static and ignore loops, or at least I hope so. But since the system needs an alarm to tell 7/7 water when it should stop being static, it's likely that it still constantly checks the spaces around it, even when static.


Going to do some testing in Fortress/Adventure mode regarding other things. Will report.

51
Isn't that just a more calculation-intensive variant of how it currently works (no flow rate, temp doesn't really spread more than 2 tiles away)?

It's a mess....But if you assume magma layer and instead calculate head towards the surface, that could greatly simplify things.

No idea, I'd have to research it some more.

Edited to talk about magma at the end there.

Heat aquifers? Haha, yeah, that would technically work.

EDIT: The way I see it, it'd run a number of loops at the start, until temperatures near magma seas and pockets stabilize. Although if magma was close enough to an underground cavern, it might run for a bit longer as it penetrates into underground air. After that, it really only calculates temperature changes that the player and other creatures create (dragonfire, dumping magma, etc). The heat system would be important if steam power is to work though.\

From the wiki:

Quote
Temperature transfer in DF is fairly simple - most temperature values have a whole part (in "degrees Urist") and a fraction part (which ranges from 0 to the material's SPEC_HEAT minus 1). Once per tick, the game calculates the relevant temperature difference (e.g. between the item itself and the tile in which it is located) and adds that to the fraction part, then adjusts the whole part until the fraction part is within range. For example, a piece of Lignite (which has SPEC_HEAT 409) at temperature 10015.0 (room temperature underground) exposed to Magma (temperature 12000) will heat up by 1985 fraction units, which will increase its temperature to 10019.349. In order to reach its ignition point of 11440, it would need to be in the magma for a total of 517 ticks, over 5 seconds at 100 fps.

That's pretty much what I described in terms of object and creature heat transfer, so that's all good. I still don't know how tile temperature transfer works though.

52
I tried to find out a way to factor in heat transfer with different rates depending on material - which led me around in a few mad circles. At one point, I literally just recreated how water currently spreads, so that was weird. In any case, I think I have a good idea for how to do it now:

Every tile has a Temperature value. Each tile undergoes a temperature check at a certain time, then loops after a certain amount of frames.

Temperature Check
Spoiler (click to show/hide)

Okay, that should about cover it. This creates a loop that checks every single tile for temperature variations and equalizes them, according to the rate of the source tile. If it ever encounters static temperatures, it flags the tiles and skips over them on the next loop - thus saving CPU cycles.



Because the function works in conjunction with its surroundings, it should have the ability to equalize temperature with respect to all 26 possible adjacent tiles.

As for how to deal with the problem of source heat tiles creating a rising tide of heat, it could either sort itself out by letting miniscule amounts of heat transfer, until it believes that two different temperature tiles are equal due to the significance.

Spoiler (click to show/hide)

Dunno how well that'd work, but it'd keep heat from rising through layers of rock, whilst still possibly allowing subterranean levels to heat up thanks to magma. It might also solve eventual magma cooling since heat stabilizes at a certain point - creating a small, static zone of 'heat saturation' that surrounds magma and the like.

53
Non-residual magma pumpstack: design where every z-level(alternating empty space and floor) is
######
#+%% .#
######

#= wall

Since magma is placed and removed each step, it gives empirically around -1 FPS per z-level of it.

Residual means that instead of pumping to 1 floor tiles it pumps to 3, so that some magma will remain behind and not force temperature calculations for magma's removal, normalizing the temperature and making it skip the heat calculation. But if magma is always cooling, I'd think that might no longer matter.

What's worse, there would always be heat flowing upwards from magma sea and volcanoes - dissipating off the map edge could work, but it'd leave weird situations where center of embark is hotter than edges.



I don't think heat affects pressure much with solids and liquids, since they don't expand/compress much with it. What it does affect is evaporation; air humidity isn't tracked right now.

Note that many specific heats are already in the raws, such as iron's 450.

For heat transfer, it probably should be most conductive - after all, current follows the most efficient path.

But if you have to check each individual tile for fluid sharing, it comes back to every-tile check. Ugh.

At which point might as well do local approximiation and either model everything in 1 tile as single heatsink, or give heat to everything in single tile at once. (It'd have the cool effect where dropping magma onto large enough pile of metal could have the metal cool down the magma to solidify it rather melt itself.)

In any case, don't see why heat flow has to be linked to fluids, rather than handled like fluids. Well, it is kinda same problem as whether handling new gaps for fluid bodies to flow into is efficient, expect whole map is an ocean.

...Much like the rest of the world, I hadn't actually considered the issue of global warming. Well, map-wide warming.

Again, I don't intend to track air either. Steam, maybe, so long as it's kept in a pressurized state (disappears/forms water without sufficient pressure, so it would delete itself if it escaped), but not really worrying about that right now.

Units to change; I'm just checking formulas and systems right now.

Yes, more conductive might be better.

If you want to measure Temp or Pressure adequately, doing an every-tile check is unfortunately unavoidable. I do have some ideas on how to alleviate the drain though.

I had only planned to consider temperature to convex between tiles - not creatures or objects. Those things can still be affected by heat, but they don't alter how it spreads. So if a ton of heat transferred into a tile containing a dorf, the dorf wouldn't affect how it spreads to the next tile, but it would change its temperature to match that of the heated tile. It could happen either instantly (spontaneous melting/freezing), or over a period of time (objects/creatures will adjust their temperature to match their tile at a certain rate, like 10 degrees a second). I like the latter since it allows you to escape danger, but it might be harder to program.

True, heat should probably be its own system.

54
This had made me think of something else regarding heat and pressure. Magma should logically produce heat that dissipates to other tiles, and heat in turn should affect pressure. You could probably use the same system that moves Pressure around to dissipate heat (in fact that'd probably work better).

Although if you wanted to, you certainly could extrapolate a system out that causes magma to revert to volcanic rock if it dips below a certain temperature. Meaning that if you dumped a tile of magma out in the open air, it'd dissipate all its heat and cool down to rock. Wouldn't actually be all that hard, I don't think - not if we're already running heat dissipation calculations for each tile. That'd require giving every tile on the map a temperature level, including rocks and open air so it can convex heat. That'd probably be a separate check entirely, but I doubt it'd be that intensive since it's just arithmetic - the CPU load would be dependent on how often the temperature cycle runs.

...So lets do that!


Quote
"Thermal conductivity (K) is a measure of the rate at which heat is conducted through a material."

"For a plate of thermal conductivity k, area A and thickness L, the conductance calculated is kA/L, measured in W·K−1 (equivalent to: W/°C)."

"Every body has its own capacity to conduct heat.  To determine how much it is we use this term. Thermal conductivity (λλ or k) is the capacity of the body to conduct or transmit heat.
Thermal Conductivity Formula

Where,
k is thermal conductivity in W/m K,
Q is amount of heat transfer through the material in J/S or W,
A is the area of the body in m2m2,
ΔTΔT is difference in temperature in K."

"The law of heat conduction, also known as Fourier's law, states that the time rate of heat transfer through a material is proportional to the negative gradient in the temperature and to the area, at right angles to that gradient, through which the heat flows. We can state this law in two equivalent forms: the integral form, in which we look at the amount of energy flowing into or out of a body as a whole, and the differential form, in which we look at the flow rates or fluxes of energy locally."

etc etc



Luckily since we're dealing with an abstraction we don't have to worry about these real laws - we just get to play with the end numbers. Each material should have a value for thermal conductivity, and whatever occupies a tile gives its value to the tile for conductive purposes. If two or more liquids ever share the same tile, it'll use the value of the least conductive.

Lucky for us, people have already found out some values for thermal conductivity:
http://physics.info/conduction/
https://en.wikipedia.org/wiki/List_of_thermal_conductivities

Lets grab a few that we want:
Air, Sea Level [0.025]
Water, Liquid [0.561]
Water, Ice [2.8]
Water, Vapor [0.016]

Based on these, Heat will flow pretty rapidly through water, but not through air, which should REALLY help with stopping magma from just solidifying instantly. Speaking of which, Magma is a little harder to parse, since real world magma's conductivity is affected by its content and depth. But we can just take a stab at it:
http://onlinelibrary.wiley.com/doi/10.1029/94JB01018/abstract

0.31? Okay, that makes it better than air but worse than water - perfekt. It means magma will take a long time to cool against air, but will cool rapidly against water.

However, one problem:
Granite [1.73]

I had anticipated stone to conduct very poorly but it actually seems like it does it well. It's not a huge problem; heat moving out from the magma still moves at a 0.31 rate.

Now, I'll run some tests to get this to work, but I'll need to modify how I distribute heat values. Might take a while; I'd just been using averages to calculate it right now, but now I'll have to calculate Heat Flux so I can multiply it by our thermal conductivity as a modifier. It'll be cool if that works.

Temperature puns~

EDIT: MUCH HARDER THAN EXPECTED. Shiiit...

55
Just water/magma, yeah, but if you want to define N new fluids, you'll need to write (N+2)! -2 interactions. And since just about anything in the game has liquid form, you'll likely want to define some rules instead, lest you die of old age first.

But then you have liquid rock + water = rock wall VS salt + water = salty water....And then checking for all this.

I'd suggest changing the magma to cool down into obsidian on its own, with water acting as just heatsink - but this probably would have massive FPS impact for each liquid body. (non-residual magma pumpstacks tend to lose -1 FPS per level of pumpstack)

I'm saying that, by default, liquids will have null interactions. You actually have to ADD effects if you want them to occur. Two liquids touching each other will have null reaction with each other unless there is a rule designating it. I suppose that still does mean you have to run a check of "Liquid A=X, I know X interacts with Y, is Liquid B=Y?" and so forth, so it isn't perfect. May need to workshop it.

Woah, I am NOT going that advanced. Water sitting next to a block of salt would not become salty in this system; there's no check for that. Not realistic, I know, but far easier. Rocks currently don't interact with adjacent rocks, after all. I just want a good flow system.

Fufu~ You'll enjoy my next post I was writing... (although I don't really understand what you mean by non-residual magma pumpstacks)

56
I envy your motivation.

Thanks

No interactions, and higher density having priority could result in free-flowing magma compressing water pools into smaller full volumes, perhaps? An interesting way to create fishing areas. Nonetheless, I picked magma and water here for a reason.

Yeah, I see your point actually. Still, if we're just talking Water/Magma the interactions aren't super complex. Just make it so that any tile containing the two of them will delete all of its tile volume, unown the tile from all bodies, and create both a chunk of obsidian in the space and spawn steam above it.

So long as it doesn't create a new fluid body, you might be able to do this with other mixtures as well - like magma and oil producing an fire that deletes the oil, but leaves the magma.

57
DF General Discussion / Re: Future of the Fortress
« on: September 03, 2016, 08:01:23 am »
The myth generator screens actually seemed to leave room for that sort of thing, over on the right side it had adjectives like "lost" "doubted" "destroyed" and whatnot as I recall, I've got some of the shots I took from the video somewhere.

Is that the video of Tarn showing the prototype off? I had to stop watching because I was busy. Yeah, I'm pretty sure he mentioned somewhere that myths could become lost so that's a definite one, but I'm mainly concerned about the fact that he showed off a block of creation myth - feels like it'd imply there's only one creation myth per world, which is just not cricket.

It'd be great in Adventure mode to be faced with a bunch of different religions, each with codexes that contradict one another, making you unsure as to which is the truth, if any. Also that sense of suspicion if the god you worship even exists - or could just be asleep for a thousand years. It'd be Fun if you got fed up and renounced your god, only to be struck down for your impudence and disbelief.  :D

Maybe, if there was a Prime Myth that every other religion took bits of and added their own nonsense, you'd have the option to try and collate all the historical and religious information you can to decipher common Myths and Events. New Adventurer Job: Historian. It'd certainly give you a reason to visit libraries and collect books. Maybe you keep finding this mention of a Dark Tower in different cultures, so you venture out to it and see what information could be stored there.

EDIT: Watching the video now. It does seem to imply different cultures will interpret the creation myth differently (depending on what they were associated with), but they do seem to share gods. My question was about whether they'd believe entirely unique creation myths, but this might work better. I could see this as a Zeus/Jupiter situation, where they just call things differently but have a similar root, so that's very interesting and plays more into the historian idea. One issue I have is that it doesn't seem to generate unique religions - just race-wide ones. It'd be cool to see sects and offshoots from big religions that interpret the creation myth and its gods differently. Like if some necromancers believe one god was actually a death deity and rewrite history to fit their view.

EDIT2: Finished it. Now I feel silly, so I edited my question a bit. Basically I just want to know if we can expect lies to be possible.

58
DF General Discussion / Re: Future of the Fortress
« on: September 03, 2016, 07:47:18 am »
Regarding creation myths (though it'd apply to regular myths as well), two things:

Firstly, is there really only one belief system per race? I'd find it odd if every culture in the world possessed identical creation myths and beliefs, so will the system be able to generate separate religions? I highly doubt creatures of different cultures and religions would hold the same creation doctrine, after all. Religions splintering off/combining, and growing/shrinking in power could be interesting. Cults that don't believe in souls, or say that a different god created their race, for example.

Secondly, by 'fake myths' I mean, can it generate myths that are actually false? In the GDC video, you did mention you can have religion and myths without fantasy existing, but is it possible to generate false gods or magic while still having some of it be real? Like, two kinds of magic runestone exist but only one of them actually works; or two gods but one is just made up by a cult.

If so, could the player could set an option for "All true/Some true/All false"?

59
This is pretty....Large idea, but honestly I have no idea if it would decrease the computational cost (PS: note that entity in DF refers to civilizations).

One problem with multiple liquids is their interaction, though this "multiple things existing in same space" problem is already present in how tossing things into fluids doesn't do more than give mist Chemical reactions are pretty complex, and this is why we have, say, molten cinnabar and molten chalk exist as objects, possibly in same magma pool, and not reacting or pushing magma out of it. To define an interaction for each of N fluids with each other, you'd need N! definitions, after all.

Bit of critique, though:

The ideas of miniscule and shared volume seems like it interacts weirdly with splitting up a murky pool to drying point and shared volume. Miniscule by itself means that N tile murky pool split into 7N+1 tile murky pool would totally dry out the moment water spread out fully, while 7N would instantly dry at the slightest evaporation but would last for a while, while 7N-1 would last for twice as long on average....You get the idea.

Though DF drying is not how actual drying works, so can lay it there.

Oh okay, didn't really know what to call it. Mobs maybe? Creatures? You could use the same system as those, but just give it a Null tile to exist in so it can't be interacted with. Instead it just operates through functions relating to various tile IDs that it 'owns'. I don't think it would use up too many resources doing checks, but pathfinding might be an issue. However even then you wouldn't be dealing with the hundreds or thousands of individual tiles like you do now. It'd deal with one Body each that knows which tiles it should fill with its combined volume. I'd probably avoid doing it every frame as well.

Hence why I'm against liquids actually having any interactions beyond affecting the Volume value of a tile, with higher density fluids taking priority for adjusting it. I feel like that's simple enough to work.

Yeah, I eventually decided that method of dealing with miniscule values wouldn't be feasible - basically for the reasons you've listed. Still don't really have a fix there, beyond bumping the units for volume far beyond the 7 we currently have.

60
Hm, another thing occurs to me. If an Aquifer is a separate body, it wouldn't be able to easily find out the highest Z level for the liquid feeding into it - not without interacting with other bodies. If it were one body, a simple Z check would solve it, so that's a favor in its point.

Additionally, since water tables actually decline, there'd need to be some kind of calculation for a declining Z level in the Water Table in an Unconfined Aquifer:

Spoiler (click to show/hide)

This, unfortunately would require some maths to pull off and that's not exactly my specialty. To figure out the water table level, it could perform a calculation that takes the highest Z level of the table and plots a grid extending out from the highest point, then stores the water table in an XYZ array. Then, when distributing water, it can check the XYZ levels of the owned tile against the grid of the water table. If the tile is below or equal to the water table, it gets a high priority - if its above, it does not.

Presumably the grid itself could be plotted using distance from the origin point of the water table, and Pressures values in surrounding tiles.

ALSO, I keep saying 'High Priority' when referring to a low distribution priority (1 is the first to be filled, 2 is second, 3 is third, etc). That's just me being a derp with nomenclature.

Also-Also (I get distracted a lot), I got bored and decided to see if I could make a pressure system:

Spoiler (click to show/hide)

So the rate of pressure expansion and fluid movement isn't correct right now, but just bear with me for a bit. What currently happens here is every Pressure change check, the system logs the Current Pressure of each tile. Then, for each tile, it adds the pressure of all the surrounding tiles (that have a pressure value) and divides them by the number of tiles it took those values from. This is a quick and dirty pressure equalization system that flows pretty well through open air - but it should realistically should interact with water and objects (like pushing water).

The second one simulates a pressurized tank that suddenly opens. Again, the water flowing out is actually pretty good. I tried to show what I imagine the water flow to be as well, although I'm just guessing on the last part about how the water would spread itself out. Ideally Gravity would be like a constant pressure depending on z level that affects what tiles to flow into.

Maybe there could also be a pressure-volume interaction if you wanted to try compressing something.

I also tried to show what the Liquid flow would look like (currently I've set a pressure of 15 psi to be the limit that 'pushes' water out of its tile, just based on atmospheric pressure at sea level). This actually seems to work pretty well, but I dunno how well it'd hold up in a variety of situations though.

Pages: 1 2 3 [4] 5