Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Gear toggling in DF2010?  (Read 644 times)

jjdorf

  • Bay Watcher
    • View Profile
Gear toggling in DF2010?
« on: April 23, 2010, 12:50:34 am »

I'll be verifying this personally in the next day or so, but to see if my hopes can remain up, do gears toggle instead of set or reset still?  Or will my dreams be crushed like so much quantum garbage under an atom smasher?

I have a few ideas for mechanical logic circuits that require the ability to toggle a gear off after building it, thus negating that input.  It should completely eliminate the need for Load gear trains on the XOR, NAND, and NOR gate designs.  I'm writing up my ideas for these gates in a user page on the wiki.  In addition, all basic gates will be 1 tile wide and two z-levels tall at most.  See my workup of the gates here.

So... For great Dwarven Science... Can gears be pre-toggled?
Logged
Quote from: ledgekindred
I can see menacing spikes of iron, but only a true dorf can make menacing spikes of dog leather or pig tail cloth!  What if they suddenly start decorating all their artifacts with like ... like ... butterflies or something.
Quote from: Heavenfall
One of my artifacts had a butterfly on it.
Oh.  Oh.  Oh Armok I'm so sorry.

AncientEnemy

  • Bay Watcher
  • The Answer is always POUR MAGMA ON IT
    • View Profile
Re: Gear toggling in DF2010?
« Reply #1 on: April 23, 2010, 12:59:44 am »

It's been awhile since i messed with mechanical logic in DF but if i recall, and according to the 40d wiki page on levers, gear assemblies always toggled, versus everything else which has two states assigned specifically to on and off.

Syff

  • Bay Watcher
    • View Profile
Re: Gear toggling in DF2010?
« Reply #2 on: April 23, 2010, 01:19:47 am »

Haven't personally verified it in 0.31, but I really don't see why they'd be different.  It's not like any of the other stuff Toady was working on (underground, military, entity positions, health care, materials,...) would really have any effect on them.
Logged

Dorf3000

  • Bay Watcher
    • View Profile
Re: Gear toggling in DF2010?
« Reply #3 on: April 23, 2010, 03:32:40 am »

See my workup of the gates here.

Interesting scheme, although your XOR gate is too complicated.

P===*===O

P= power, O = output

Build the gear, toggle it off with a lever, then connect BOTH inputs (initially off) to this one gear.

Unless there is some bug where simultaneous state changes aren't handled properly for gears, or you want to color code gears according to what input they are linked to, this is all you need.
Logged
I had a tigerman get elected mayor and he promptly mandated 3 bowls of cereal.

jjdorf

  • Bay Watcher
    • View Profile
Re: Gear toggling in DF2010?
« Reply #4 on: April 23, 2010, 08:57:29 am »

See my workup of the gates here.

Interesting scheme, although your XOR gate is too complicated.

P===*===O

P= power, O = output

Build the gear, toggle it off with a lever, then connect BOTH inputs (initially off) to this one gear.

Unless there is some bug where simultaneous state changes aren't handled properly for gears, or you want to color code gears according to what input they are linked to, this is all you need.

Nice! You're right; as long as a gear getting two signals at one time step doesn't toggle, this will work perfectly.  And it's far more elegant, an even better improvement on the main Mechanical Logic article on the wiki...

I'm adding this to my list of things to test, as well as adding it to my wiki page.  Synchronizing two signals at once should be possible by connecting two pumps to one power through a levered gear.  The output side of the pumps will have the two input pressure plates, which should toggle on at the exact same time.  I'll simply co-opt my variant of the rotation sensor to do the job.
Logged
Quote from: ledgekindred
I can see menacing spikes of iron, but only a true dorf can make menacing spikes of dog leather or pig tail cloth!  What if they suddenly start decorating all their artifacts with like ... like ... butterflies or something.
Quote from: Heavenfall
One of my artifacts had a butterfly on it.
Oh.  Oh.  Oh Armok I'm so sorry.