Bay 12 Games Forum

Please login or register.

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

Author Topic: Fluid Logic Practical Applications?  (Read 2063 times)

Kanddak

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #15 on: October 19, 2009, 03:33:09 pm »

Well, no, dwarven computing is not practical at all.  There's no task that a dwarf computer can do that a human can't do better, faster, and with less accidents.

(Consider my drowning chamber: it works great.  But if there's a dwarf who's in the chamber itself when it's activated, perhaps looting some previous victims....well, that dwarf is dead.  Whereas if it was a manually controlled operation, the dwarf could be ordered away first.  And, as usual, a tunnel of cage traps would outperform both.)

This is basically the argument for building a semi-automatic drowning trap.
The one I built a while ago required a lever pull to flood or drain the trap, but the logic system took care of making sure it went through the sequence in a safe order so that all entrances were closed before water was added, and water was allowed to drain before the trap chamber reopened. The big advance gained was the avoidance of having to use a room full of levers to independently control seperate components of the trap, reducing the likelihood of an accident.

Sphalerite, post more about your one-way corridor and maybe I can help. A couple quick points:
- I always build logic systems under pressure from a multi-level cistern, with a diagonal between a pressure plate and a drain so that the water diffuses into the drain much more slowly than it flows under pressure to refill the resulting space. Then I use 0-5 and 6-7 plates. This prevents problems with fluctuation as long as I make sure the water flow rate is high enough even when several components are flowing water.
- As far as I can tell, pressure plates send one "off" message when they become triggered and one "on" message when they become untriggered. A creature stepping on and then off of a plate will cause one message of each type to be sent, but usually well within the delay time for floodgates and bridges, causing them to toggle.
Logged
Hydrodynamics Education - read this before being confused about fluid behaviors

The wiki is notoriously inaccurate on subjects at the cutting edge, frequently reflecting passing memes, folklore, or the word on the street instead of true dwarven science.

Slogo

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #16 on: October 19, 2009, 03:39:12 pm »

@Sphal and others. In my experience using a hatch is the best way to get an instant and consistent flow result. Simply have water flowing in on top of a hatch then tie that hatch to the lever (well do the lever part first). Dropping water should 'move' faster than water flowing horizontally. I also recommend a good amount of drainage (tiles of drainage controlled by doors or whatever) and very tight water levels (0-2 and 3+) for the plates.

For more complex logic use multiple hatches that drop water on every tile of the logical gate.

Reese

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #17 on: October 19, 2009, 03:52:51 pm »

This seems to screw things up and cause the pressure plate release signal to not always get sent.  I'm also having trouble figuring out the logic of what happens when you have multiple pressure plates set to the same target device.

dunno if this will help, but...

a pressure plate sends an open signal when it's triggered and a close signal 100 steps after the triggering presence leaves(and stays triggered until that time).  Flood gates and bridges wait 100 steps after recieving a signal before activating, and ignore all other signals during that time...

so if you have multiple triggers to a single door, whichever sends the appropriate signal to change it's state (close when it's open and open when it's closed, and remembering that bridges are open when retracted or raised, and closed when they are down and capable of bearing traffic)

the one exception is gears, which toggle instantly when they recieve a signal (dunno what happens if it recieves simultaneous signals), and flip to the opposite of their current state regardless of which signal is sent by the attached triggers.
Logged
All glory to the Hypno-Toady!

BlazingDav

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #18 on: October 19, 2009, 05:05:23 pm »

@Sphal and others. In my experience using a hatch is the best way to get an instant and consistent flow result. Simply have water flowing in on top of a hatch then tie that hatch to the lever (well do the lever part first). Dropping water should 'move' faster than water flowing horizontally. I also recommend a good amount of drainage (tiles of drainage controlled by doors or whatever) and very tight water levels (0-2 and 3+) for the plates.

For more complex logic use multiple hatches that drop water on every tile of the logical gate.

lol forgot about that one, i ended up using channels and floodgates to get the same effect XP though it should work just as fine to lock stuff in place once the pressure plate 'toggles'

@magua: thats what i do, but i deliberately set the length to be about 10 or so tiles shorter than the range of a ballista if thats a worthy hint XP

@sphal: I have a suggestion though you would have to put up with very long corridors with few specific blocking systems, using series of pressure plates linked up to floodgates in a similar line, with water at one end and a pressure plate at the other, as humble critters walk triggering these pressure plates the floodgates then opening if they walk the right way they open and close doors to control the paths they can take so that instead of taking one that would automatically block as they walk instead they walk a clear one that closes shortly after them, to minimise chance of someone walking in the way they did, by linking 1 pressure plate alleway to 2 floodgate lines going in different directions you'd get:


C             S
C             S
C             S
       P
       P
       P
       P
C             S
C             S
C             S

P for pressure plate alleway, C for clear way, S for self-sealing way

an almost foolproof system i guess, though not very space friendly I imagine
Logged

goron72

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #19 on: October 19, 2009, 10:55:02 pm »

So say I want an automatic(key word) drowning chamber. Reasonable right? My plan would be a corridor with a line of pressure plates hooked up to two bridges ensuring troll protection and opening a floodgate a level above dropping the wrath of an underground river (again trolls solved, would they attack the pressure plates?). Water fills to 7/7, how would I automatically time how long it takes for them to drown? I'm thinking a pressure plate set to 7/7 water in the back that allows the water passage in a long corridor that ends in a pressure plate set to 7/7 water that resets the whole process. Would this end up in too many dangerous 6/7 tiles? Should I have a perimeter to eliminate this possibility? How long does the corridor need to be or is there a better way to time it? Thanks for reading the whole thing!

!Bridge!
!PP(monsters->bridges)!
!death!
!P(7/7->drain/timer)!
!timerFloodgate =D=R=A=I=N=A=G=E=P=I=P=E= PP(7/7->Reset all)!
!Bridge!
Logged

Magua

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #20 on: October 20, 2009, 12:09:18 am »

1) Long corridor (mine is about 100 tiles long, 3 wide; I put no research into timing, I just made a really long corridor).

2) Raiseable bridges at either end of corridor.  I don't have much experience with building destroyers, but I do believe that trolls will wreck your fun.  Sorry.

3) Pumps along one side of the wall, pointing into the corridor (one every 10 squares).  Pumps are sourced by an aquifer (convenient).

4) Raiseable bridges along the other side of the wall, beyond which are grates above the aquifer.  This'll be the sink.

5) 3 pressure plates in the middle of the corridor (going across).These are the on switches; they're triggered by non-citizen creatures size 4 or more.  I call these pressure plates A.

6) Two pressure plates, one at either end of the corridor.  These are the triggered by 7/7 water.  These are pressure plates B.

So it looks like this:

Code: [Select]
XXX...XXX
XXXbbbXXX
XXXbbbXXX
XXX..^XXX
XXX...XXX
XXX...bbG
~pP...bbG
XXX...bbG
XXX...XXX
(pump pattern repeats)
XXX...bbG
~pP^^^bbG
XXX...bbG
(more repeats)
XXX...XXX
XXX...bbG
~pP...bbG
XXX...bbG
XXX...XXX
XXX..^XXX
XXXbbbXXX
XXXbbbXXX

Elsewhere, the control mechanism, shown here in vertical, not horizontal, mode:

Code: [Select]
X~~~XXXXX
XXXcXXXXX
XXXc__ XX
XXX^FF  X
XXXXXXX X

X = wall
~ = water
^ = pressure plate
c = hatch cover
F = floodgate

The "on" pressure plates from the corridor open the top hatch cover, allowing water to flow down.

The bottom hatch cover is controlled by a lever; if it is open, the trap is "armed"; if it is closed, the water will drain off harmlessl and the trap is "disabled".

If both hatch covers are open, water lands on the pressure plate.  This is pressure plate C, and is set for 2/7 water or higher.  When it is tripped, the bridges in the corridor are raised, and power is supplied to the pumps.  Result: corridor begins to flood.  This is setup like this so that once pressure plates A have fired, they're not required for further flooding of the corridor -- it doesn't matter where the creatures go now, or if they do or do not step on the "A" pressure plates.

When the corridor has flooded almost completely, the "B" pressure plates in the corridor will trigger, responding to the 7/7 water.  Each of these is linked to one of the floodgates in the control mechanism, so they both have to be "on" for water to drain off of pressure plate "C".  When they are both open, and water has drained off so "C" is at 0/7 or 1/7 water, it'll trigger again, lowering the bridges and stopping the pumps.  Water then flows through the grates on the east hand side into the aquifer.

(Grates are installed to keep the loot from flowing into the aquifer too).

So the timing is controlled by how fast water drains off of the "C" plate.  In the setup provided above, this turns out to be just slightly longer than it takes a goblin to drown.  To increase the time, just make a larger room for the "C" pressure plate, so more water will fall in from the hatches. 

Logged
Also, you can manufacture vomit at a smelter.  Subsequently removing the smelter spews vomit over a surprising area.

goron72

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #21 on: October 20, 2009, 12:36:03 am »

Holy carp, that is one dwarfy trap.  :o . I think I'll try to simplify it, a lot... Actually I have 106 Pop and haven't seen any gobs yet and no elven caravan. If I manage a trap I will definitely post it although it will probably end up on my next fort. Thank you very much! My head....
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #22 on: October 20, 2009, 05:40:35 am »

Personally I preferr to use magma rather then water, and keep my traps small and quick. That way they are a lot less likely to turn a usefull dwarf into soup.

Currentelly im trying make a corridor with checkerboarded plessure plates and grates. like this:


====================
^#^#^#^#^#^#^#^#^#^#
#^#^#^#^#^#^#^#^#^#^
^#^#^#^#^#^#^#^#^#^#
====================


Above the corridors are pumps and gears, like this:


% % % % % % % % % % % %
%%% %%% %%% %%% %%% %%%
 %   %   %   %   %   %
 *** *** *** *** *** **
   %   %   %   %   %
% %%% %%% %%% %%% %%% %
% % % % % % % % % % % %


Each pressure plate will activate the section of 6 pumps above it.

Now, the idea is that each pump only drops 1 7/7 block of magma through the grate. The magma shouldnt ever stay in the corridor or the enemies wont path through it anymore, and it will melt their iron ore armour.

The magma that falls through the grates should be pumped up to the main storage basin by pumps that can be kept running constantelly, but to prevent that from overflowing I plan on adding a buffer system.

I plan on doing that by making each set of 3 pumps draw from a buffer below it, which is only 3 tiles in total surface. Another pump will fill the buffer from a main storage basin, the main pumps shouldnt pump while the buffer pumps pump. pumpss...

I divided the pumps in sections like this:


% %
%%%
 %
 ***
   %
  %%%
  % %


The central gear is connected to a power source, and is triggered by the pressure plates below.

The outer gears are connected to a prussure plate in the buffer basin. If the buffer is full, its engaged. If it isnt, its disengaged. Each outer mechanism only works for the group of 3 pumps it is directely attached to.

It should be possible to reverse the corridor by linking all central gears to a lever. As courtesy towards the elves.

This is a pretty practical purpose, though of course no more effective then a corridor lines with weapon or cage traps, it should be funny as hell to watch goblins try to storm through a magma shower corridor, and it shouldnt burn my dwarves unless they stand very close to the goblins.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

BlazingDav

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #23 on: October 20, 2009, 06:31:07 am »

On another note, to make use of those clock things, maybe if you rigged them up to doors you could seal off sections of cave for multiple years and then open them, specifically to keep dwarves and pests out of your tower cap farms while they all grow up, or for your preferred time length =P
Logged

Quantum Toast

  • Bay Watcher
  • Schrödinger's Breakfast
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #24 on: October 20, 2009, 01:45:36 pm »

Do mist generators count? Some guy posted a simple and effective design.

HPH
P  P
HPH

H = Channel. P = pump.

The idea is that the pumps are driven by electricity so they're always moving, one of the channels is marked as a pond - and dwarves put one unit of water in it. After this I don't know if you should inactivate the pond or not, more water in circulation could increase mist .. or leak..
You can keep adding water until there's a 7/7 block of it spinning around the system. Any more than that and it'll leak out though.
Logged
That would be as deadly to the wielder as to anyone else!  You'd sever your own arm at the first swing!  It's perfect!

blue sam3

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #25 on: October 20, 2009, 03:38:56 pm »

A while ago I drew up some plans to automate my entire defence system, with the main entrance automatically opening for traders, goblins being routed into my iron armour/GCS silk harvesting chamber (then the GCS being released, other siegers being routed into the main archery practice area, and megabeasts (and elephants, haven't worked out a way around this one yet) being automatically encased in obsidan. I never built it due to lag, but I have recently got a faster computer, so maybe sometime soon...
Logged

Kanddak

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #26 on: October 20, 2009, 05:50:32 pm »

How did you plan to make your system distinguish between traders, goblins, migrants, etc?
Logged
Hydrodynamics Education - read this before being confused about fluid behaviors

The wiki is notoriously inaccurate on subjects at the cutting edge, frequently reflecting passing memes, folklore, or the word on the street instead of true dwarven science.

Reese

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #27 on: October 20, 2009, 06:36:57 pm »

How did you plan to make your system distinguish between traders, goblins, migrants, etc?
by default, pressure plates don't trigger on friendly units, but you can configure them to. you could set up a corridor with a side loop, make the non loop part restricted, and place a pair of pressure plates, one that triggers on friendly, one that doesn't; if both trigger, it's traders and diplomats; if only one set triggers, it's enemies, and your dorfs will go the long way and trigger neither.
Logged
All glory to the Hypno-Toady!

blue sam3

  • Bay Watcher
    • View Profile
Re: Fluid Logic Practical Applications?
« Reply #28 on: October 21, 2009, 08:28:41 am »

A mixture of friendly-triggered/non-friendly triggered pressure plates and pressure plates set to different weights (with the trade entrance opened the day before the season change to allow the traders in, unless the megabeast trigger is active)
Logged
Pages: 1 [2]