Bay 12 Games Forum

Please login or register.

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

Author Topic: Minecart Dwarfputing Ideas and Discussion  (Read 19156 times)

BloodBeard

  • Bay Watcher
    • View Profile
Minecart Dwarfputing Ideas and Discussion
« on: August 17, 2012, 12:19:18 am »

I've read (skimmed really) through the How Does Minecart thread and collected what I could find on practical designs for dwarfputer components using minecarts. There was unfortunately very little on the subject and I had a couple ideas of my own so I thought i'd make a thread devoted to the topic so you don't have to look through 40 pages.

If you'll indulge me, this was the goto design pre-minecarts for storing memory for large and complex dwarfputing machines. Another design where you simply have a pump continuously pump water over a pressure plate to send an 'on' signal and turning it off, letting it drain for an 'off' signal was also used as a power-to-signal converter. I mention these because you're going to see just how much easier it is now to store binary data with minecarts.

Binary Memory Cells:

Binary Memory Cells store binary data as a 1 or 0 (on or off). For minecarts this means a minecart occupies a pressure plate to create a 1 and by some means removed to make a 0.


It's split into 3 versions to show where the minecarts go, what's beneath the minecarts and what's beneath the rollers and pressure plates.

How this works is I got 2 carts, a copper one at the top and an iron one in the center. A copper cart weighs 357 Urists and an iron cart 314 Urists. The pressure plate in the center is set to activate at 350 Urists, so the iron cart doesnt trigger it. Activating the gear/roller (green one), making the copper cart push the iron cart to the other end before rolling onto the pressure plate will trigger it and send an on signal. Visa versa (the iron cart will push the copper cart just fine even though it's a little bit lighter) to send an off signal. This design is the most space-efficient of the memory cells but lacks the activation speed of the next design due to the first cart having to push the second cart before being moved onto the pressure plate itself.
 
A modular example of this design:



This design is slightly longer, having 4 tracks instead of 3, but has the advantages of activating the pressure plate almost immediately upon power being sent and not having to mess with weights. To activate, power is sent to the green gear, pushing the top cart into the second cart. Like a Newton Cradle,  the first cart transfers its momentum to the second cart, knocking it to the other end while the first cart rests on the pressure plate to send an on signal. The gear is then turned off. To turn it off power is sent to the red and the reverse happens.

A modular example of this design:


Power-to-Signal Converters:

A power to signal converter sends an on signal when power is applied and an off signal when power is cut.


When power is sent to the gear the roller pushes the cart around in a loop, passing over the pressure plate repeatedly to maintain an on signal. When power is cut the cart returns to the starting position and disengages the pressure plate. The roller in this example pushes the cart from E->W. Pay close attention to the track layout to make sure it works properly. The 2 walls at the top are all that's needed to keep it from derailing.

A modular example of this design:



After being propelled by a roller, a N-S track ramp in this PSC uses gravity to send the cart back the other way (and to the roller) to maintain an on signal. As far as advantages go to this design or the looped PSC, it's really a matter of preference and use, though the looped version can be more compact in a modular layout.

A modular layout using this design:


An angled version of this is also possible but has no real advantages over the straight version.


Other Designs:


A simple changeover switch based on the Newton's cradle memory cell. Rollers directed to the center, activation of the northern roller pushes the first cart into the second cart, engaging the northern pressure plate and deactivating the southern plate. While both will be active momentarily because of the deactivation delay, neither can be deactivated at the same time and one will always be active.


A 3-stated version of the changeover switch, it consists of three pressure plates with only one active plate allowed at a time (should the gears be linked to not allow certain rollers to be activated at the wrong time).


Three just weren't enough. This is a 4-stated switch, allowing only one at a time to be active should the gears be correctly linked to disallow unwanted minecart movements.


I was able to take the load adjusting pressure plate concept of my memory cell and put it into a possible power-to-signal converter. It functions much like the memory cell, but with different linkages (and an axle). Now i'm not so sure if this can be called a power-to-signal converter since you don't simply send power to a gear and the thing maintains an 'on' signal, or be considered a memory cell, but it's really all about how you use it.

Both gears are off by default and the power is connected to the dark green gear. Be it by lever or pressure plate, both gears are switched on, sending power to both rollers (directed to the center). The copper cart pushes the iron one to the other side, but before the southern roller has time to push it back north the copper cart is rolled onto the pressure plate which turns off the dark green gear (and the southern roller). The light green gear is still engaged but no power is being sent to it because the dark green is off. This was the sort of "eureka!" moment when I saw that rollers immediatly stop when power is cut (unlike screwpumps) to allow this. (sorry if this is common knowledge, i'm a bit late to the game in getting into the 2012 versions)

Both gears are switched again when you want to turn it off, activating the dark green gear and disengaging the light green, sending both carts back to their starting points, deactivating the pressure plate which turns the dark green off again (but keeps the roller on long enough to push the iron cart thanks to the pressure plates 'off' delay). Everything is back to how it was at the start.

With the other pts examples, only 1 gear is needed to be switched to turn them on and off. If you treat both of these gears as you would a single gear then I guess you could also call it a power-to-signal converter, and is the only one that has no moving water or minecarts when it's in the on position. Useful if you have a whole bunch of them active at the same time and want to minimize lag.

Now i'm not sure, but the implications of this last component might be huge for dwarfputing. That with a single lever or single pressure plate you can trigger an on and off signal on another component without any continuous moving parts wasn't possible with the mechanical-fluid logic examples I listed at the top of this post. It might be possible to use it as a binary memory cell aswell, except I don't think there would be a 'standard' design and the gearing/linkages would need to be customized to the task it performs. I might have to make something, or at least plan it to see.

tl/dr LOL SCIENCE

If I was unclear on something or there's something i've overlooked please let me know. I've tested all these designs in a real fort and they appear to work flawlessly.

Post any of your own ideas if you like, so long as it has a use in dwarfputing :)
« Last Edit: September 14, 2012, 05:32:37 pm by BloodBeard »
Logged

Xob Ludosmbax

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #1 on: August 17, 2012, 04:07:32 am »

Brilliant work!  This is no less revolutionary than the transition from relay based computing to transistor based computing!  Double dwarf points for logic gates and an adder unit. 

Trif

  • Bay Watcher
  • the Not-Quite-So-Great-as-Toady One
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #2 on: August 17, 2012, 05:23:03 am »

Very nice! I haven't been following the developments in minecart logic, so it's nice to see the most important stuff in one place. Your innovations seem really useful, too.

This finally separates mechanical logic and fluid logic! Hooray!
Logged
Quote from: Toady One
I wonder if the game has become odd.

Kofthefens

  • Bay Watcher
  • Keep calm and OH GOD CAPYBARAS
    • View Profile
    • Marshland Games
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #3 on: August 17, 2012, 10:52:57 am »

I understood your description! Yay!

As I am a dabbling dwarfputing engineer (Rusty),  and I understood it, this bodes well for the device. The more I understand, the simpler it was, and simple tends to be more compact and efficient. Well done.
Logged
I don't care about your indigestion-- How are you is a greeting, not a question.

The epic of Îton Sákrith
The Chronicles of HammerBlaze
My website - Free games

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #4 on: August 17, 2012, 11:07:31 am »

Couldn't you simplify that by shifting the cyan gears up 1 tile and the yellow gears down 1 tile, allowing you to eliminate half of the green gears?
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

ThatAussieGuy

  • Bay Watcher
  • King of the HFS & only man to win v0.31.25
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #5 on: August 17, 2012, 11:13:51 am »

If anyone ever manages to engineer Dwarf Fortress running on Dwarf Fortress, it'll be Bloodbeard.  Fine dorfputing work yet again, good sir.

You should try a simple logic gate and build upwards from that, just to see what you can get away with and what the timing delays are like.

BloodBeard

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #6 on: August 17, 2012, 12:05:02 pm »

Couldn't you simplify that by shifting the cyan gears up 1 tile and the yellow gears down 1 tile, allowing you to eliminate half of the green gears?

Yes, but like I mentioned I added more gears than necessary to allow for complex mechanical logic gates. The example there has 2 gears that can be customized to each of the cells rollers and the cyan/yellow gears can turn whole sections on and off. I've done large scale computing before and needing 3 different gears to be engaged to use a cell was very common.

The gearing isn't set in stone really and is the most versatile part of dwarfputing, it depends on what you intend to do with it all.

I forgot to mention, all the examples I posted were made with rollers at the highest speed, and always, ALWAYS forbid minecarts once you've placed them and make sure the rollers are off when you do. Much blood was spilt when I was learning how to use them for this.  :'(

I've got a fort that has a few of these in working order, i'll make a video of it and post it here later.

EDITZ: video here
« Last Edit: August 17, 2012, 01:12:38 pm by BloodBeard »
Logged

TinyPirate

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #7 on: August 26, 2012, 12:15:43 am »

Bloodbeard, thanks for the write up. It has significantly aided me in my plans for a 3-burst automatic minecart shotgun (I am calling it the Pan Galactic Gargleblaster as it will fire gold bricks and giant ace blades ("like being hit in the head with a gold ingot wrapped in a slice of lemon", get it? Hehe).
« Last Edit: August 20, 2014, 05:47:44 am by TinyPirate »
Logged

Kaos

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #8 on: August 30, 2012, 08:40:43 pm »

These allow for latching (a plate that once stepped on will stay on until you manually set it off using a lever) pressure plates, right?
What about response times? if I understand correctly if I link the start gear to the plate I want to latch, immediately (maybe a couple of tics delay to account for the cart moving?) after something steps on the plate it will turn on the gear, which powers the roller that moves one cart against the other leaving the heavier one on top of the module's plate.... this plate is my output signal that I link to whatever I want to activate and stay activated... if the original input plate resets to off it won't affect the module since the only way to reset the module is to trigger the second gear that pushes the carts to their original state, right?
So when I trigger the second gear to reset the system I still have to wait for the pressure plate inside the module to reset (99 tics) after the heavier cart is no longer on top of it, right?
Isn't it possible to have two of these modules with inverse states linked so both the on and off signals are triggered instantly? maybe one set to trigger the plate on the heavy cart and the other one on the lighter one??

Logged

TinyPirate

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #9 on: September 04, 2012, 08:36:00 am »

Bloodbeard - your awesome posts helped inspire me to get to grips with some DF computing ideas.

To this end I've built and videoed an automated minecart shotgun. It uses 7 memory cells and numerous other trigger events. Enjoy!
Logged

BloodBeard

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #10 on: September 05, 2012, 04:57:24 pm »

These allow for latching (a plate that once stepped on will stay on until you manually set it off using a lever) pressure plates, right?
What about response times? if I understand correctly if I link the start gear to the plate I want to latch, immediately (maybe a couple of tics delay to account for the cart moving?) after something steps on the plate it will turn on the gear, which powers the roller that moves one cart against the other leaving the heavier one on top of the module's plate.... this plate is my output signal that I link to whatever I want to activate and stay activated... if the original input plate resets to off it won't affect the module since the only way to reset the module is to trigger the second gear that pushes the carts to their original state, right?
So when I trigger the second gear to reset the system I still have to wait for the pressure plate inside the module to reset (99 tics) after the heavier cart is no longer on top of it, right?

Yes to all of this.

Isn't it possible to have two of these modules with inverse states linked so both the on and off signals are triggered instantly? maybe one set to trigger the plate on the heavy cart and the other one on the lighter one??

I'm not sure what you mean exactly.


I've updated the main post and changed things up a bit to include a new and better binary memory cell that TinyPirate accidently made ( :P). I removed one of the binary memory cell examples because the new one is basically an improved version.

TinyPirate

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #11 on: September 06, 2012, 01:21:50 am »

Awesome!

Anyway, we really need to wiki this.
Logged

Kaos

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #12 on: September 06, 2012, 12:05:39 pm »

What about response times? if I understand correctly if I link the start gear to the plate I want to latch, immediately (maybe a couple of tics delay to account for the cart moving?) after something steps on the plate it will turn on the gear, which powers the roller that moves one cart against the other leaving the heavier one on top of the module's plate....

So when I trigger the second gear to reset the system I still have to wait for the pressure plate inside the module to reset (99 tics) after the heavier cart is no longer on top of it, right?

Yes to all of this.

Isn't it possible to have two of these modules with inverse states linked so both the on and off signals are triggered instantly? maybe one set to trigger the plate on the heavy cart and the other one on the lighter one??
I'm not sure what you mean exactly.
I was referring to the response times I asked above, the regular module works like this:
1) trigger 1st gear -> immediately sends open signal
2) trigger 2nd gear -> 99 ticks wait for the plate to reset and send close signal
I was asking if there's a way to avoid step 2, 99 ticks delay, and send the close signal immediately.
Logged

BloodBeard

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #13 on: September 06, 2012, 12:58:23 pm »

I was referring to the response times I asked above, the regular module works like this:
1) trigger 1st gear -> immediately sends open signal
2) trigger 2nd gear -> 99 ticks wait for the plate to reset and send close signal
I was asking if there's a way to avoid step 2, 99 ticks delay, and send the close signal immediately.

It depends on what you're sending the signals to. This can be done with gears, but doors/bridges/latches and things are subject to a delay regardless what you do. Also, if 2 memory cell plates are linked to a bridge, activating the first pressure plate will close it, but activating or deactivating the second wont open it again, and vice versa.
« Last Edit: September 06, 2012, 07:28:08 pm by BloodBeard »
Logged

TinyPirate

  • Bay Watcher
    • View Profile
Re: Minecart Dwarfputing Ideas and Discussion
« Reply #14 on: September 07, 2012, 05:11:55 am »

I've started a wiki page on Minecart Logic. I will need help!
Logged
Pages: [1] 2 3