Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5

Author Topic: I proppose a new-ish fluid sistem.  (Read 9644 times)

Draco18s

  • Bay Watcher
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #30 on: November 19, 2011, 03:43:22 pm »

I like the idea of having such things defined in the liquids' raws. So, water might have [MIX_PRODUCT:MAGMA:WALL:INORGANIC:OBSIDIAN] or something, and ammonia might have [MIX_PRODUCT:VINEGAR:LIQUID:FOAM] while vinegar has [MIX_PRODUCT:AMMONIA:ITEM:BOULDER:NONE:INORGANIC:EXPLOSION], where INORGANIC:EXPLOSION is a pre-defined exploding inorganic material.

Except that every time you add a new liquid, you have to go over to every other liquid and define it's reaction.  It's an exponential problem.
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #31 on: November 20, 2011, 10:19:57 am »

I like the idea of having such things defined in the liquids' raws. So, water might have [MIX_PRODUCT:MAGMA:WALL:INORGANIC:OBSIDIAN] or something, and ammonia might have [MIX_PRODUCT:VINEGAR:LIQUID:FOAM] while vinegar has [MIX_PRODUCT:AMMONIA:ITEM:BOULDER:NONE:INORGANIC:EXPLOSION], where INORGANIC:EXPLOSION is a pre-defined exploding inorganic material.

Except that every time you add a new liquid, you have to go over to every other liquid and define it's reaction.  It's an exponential problem.

A. No, some liquids would just not mix.
B. How many liquids aside from water and magma do we really need?...That would interact?
C. Alcohol and blood, two of the likeliest and at first glance most diverse types of non-naturally-occurring-in-pools-or-whatever liquids, are defined by templates which can describe what happens when stuff mixes.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

King Mir

  • Bay Watcher
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #32 on: November 20, 2011, 12:08:43 pm »

I like the idea of having such things defined in the liquids' raws. So, water might have [MIX_PRODUCT:MAGMA:WALL:INORGANIC:OBSIDIAN] or something, and ammonia might have [MIX_PRODUCT:VINEGAR:LIQUID:FOAM] while vinegar has [MIX_PRODUCT:AMMONIA:ITEM:BOULDER:NONE:INORGANIC:EXPLOSION], where INORGANIC:EXPLOSION is a pre-defined exploding inorganic material.

Except that every time you add a new liquid, you have to go over to every other liquid and define it's reaction.  It's an exponential problem.
That's true but, in addition to what the poster above said, it's only a developer time cost, so it only needs to be done once. A committed modder would have no problem with it.

BINGO! Exactly what I wanted to say! You get a cookie!
Yum. This better not be a tracking cookie.
« Last Edit: November 20, 2011, 12:13:48 pm by King Mir »
Logged

antymattar

  • Bay Watcher
  • *Antymattar has created a Cat-ass-trophy*
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #33 on: November 20, 2011, 12:20:28 pm »

Or you could just define liquid reactions sepperately from the liquids. This way it would be WAAAAY easier for modders.

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: I proppose a new-ish fluid sistem.
« Reply #34 on: November 20, 2011, 12:21:37 pm »

OH GOD IMAGINE THE EPILEPSY.

antymattar

  • Bay Watcher
  • *Antymattar has created a Cat-ass-trophy*
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #35 on: November 20, 2011, 12:36:12 pm »

What!? ???

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: I proppose a new-ish fluid sistem.
« Reply #36 on: November 20, 2011, 03:40:36 pm »

What!? ???

Random flashing colourful tiles + DF + Flying Gibby bits = Epic Dwarf Rave/Ultimate seizure

antymattar

  • Bay Watcher
  • *Antymattar has created a Cat-ass-trophy*
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #37 on: November 20, 2011, 04:09:40 pm »

Oh. Yeah.  :P. Well you could sort of blend it but the way the game looks right now I dont think there are many epileptics playing anyway.

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: I proppose a new-ish fluid sistem.
« Reply #38 on: November 20, 2011, 04:25:43 pm »

Oh. Yeah.  :P. Well you could sort of blend it but the way the game looks right now I dont think there are many epileptics playing anyway.

Not yet at least ^-^

antymattar

  • Bay Watcher
  • *Antymattar has created a Cat-ass-trophy*
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #39 on: November 21, 2011, 02:43:46 am »

Oh. Yeah.  :P. Well you could sort of blend it but the way the game looks right now I dont think there are many epileptics playing anyway.

Not yet at least ^-^
Obviously, you have never built a 11x11 bee farm.  ;)

harborpirate

  • Bay Watcher
  • cancels eat: job item lost or destroyed.
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #40 on: November 21, 2011, 02:42:40 pm »

Its not quite as bad as an exponential problem to define reactions in the raws for two reasons:
1. If no reaction is defined then the two liquids just fail to mix (no reaction).
2. You could define a default reaction like for say magma where it just always has a certain interaction if one is not defined (in this case probably create stone type obsidian).

I also agree that interactions as a separate raws entry is a good idea, because it prevents duplication.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #41 on: November 21, 2011, 02:53:01 pm »

1. If no reaction is defined then the two liquids just fail to mix (no reaction).

Define "fail to mix" in a cellular automata sense, please.
Logged

harborpirate

  • Bay Watcher
  • cancels eat: job item lost or destroyed.
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #42 on: November 21, 2011, 03:13:48 pm »

Some possibilities:
1. The two fluids block each other from flowing as if they had run into a solid.
2. DF is updated to track multiple liquids in a given tile and the tile gets about half of each. (3 of one and 4 of the other).
3. Both tiles form a default compound, like "sludge" or somesuch.

I'd probably go with #1 to start out with if I were Toady since it would be easier.

As for what this looks like in code, this is the default case in a switch statement or the else in an if conditional.
« Last Edit: November 21, 2011, 03:17:21 pm by harborpirate »
Logged

antymattar

  • Bay Watcher
  • *Antymattar has created a Cat-ass-trophy*
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #43 on: November 21, 2011, 03:42:03 pm »


Mixing and "mixing" is not the same thing. many liquids can mix in one tile but all this means is that they are both there. The heavier one will be at the bottom the lighter ones on the top etc. But MIXING means that two liquids can either become a solid wall or a "lump"(Ie boulder. Neccesary for conservation of energy and mattar etc blahdiblah) of something. They may also turn into other liquids if the material for the liquids is defined. This means that modders have a really easy time to just ad in a completely new branch to the liquids system.

Draco18s

  • Bay Watcher
    • View Profile
Re: I proppose a new-ish fluid sistem.
« Reply #44 on: November 21, 2011, 04:16:23 pm »

Some possibilities:
1. The two fluids block each other from flowing as if they had run into a solid.
2. DF is updated to track multiple liquids in a given tile and the tile gets about half of each. (3 of one and 4 of the other).
3. Both tiles form a default compound, like "sludge" or somesuch.

And those would have to be coded in the RAWs as well.  Very very VERY (if any) few liquid interactions in the real world do 1 (form a vertical boundary).  Most will either mix (3ish*) or layer on top of each other based on density (2).  2, however, is very easy to code, as it can be implied based on the material definitions.  3is is harder, but possible as it depends on what type of material each is (a water-soluable liquid won't mix with a lipid-soluable liquid, even if both are the same density).

It's the acid/base, water/magma type reactions that are extremely difficult to code as every liquid likely interacts in some way to large numbers of every other liquid.  I.e. vinegar and ammonia would both (in large quantities) turn magma into obsidian.

The trickies reactions of all are the ones that involve three or more liquids.  I.e. one is a catalyst for a chemical reaction of the other two (I do not know of any that exist in pure liquid states).

*By which I mean two liquids mixing homogeonously into a "new" liquid.  I.e. water and milk.
Logged
Pages: 1 2 [3] 4 5