Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 69 70 [71] 72 73 ... 95

Author Topic: Holy Crap Minecarts (Devlog Quote)  (Read 250013 times)

Miuramir

  • Bay Watcher
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1050 on: April 25, 2012, 08:54:21 am »

Can you really do ternery computing, though? My understanding is that binary is easy because of the small number of logic gates. You'll have to design a lot of new ones for ternery.

The main reason to use ternary computing is to take advantage of balanced ternary, usually represented as "-1, 0, +1".  If you are talking about DC voltages in analog circuits, this translates very easily to "-voltage, no voltage, +voltage'; and has some neat advantages.  With somewhat more work, you can use it with mechanical shaft/gear logic, with "counter-clockwise, stopped, clockwise" rotation; however, the inherent "cancelling" of the -1 and +1 which is one reason to use ternary in the first place tends to be hard on physical gears, loosing most of the advantage.  There have been proposals to use polarization states in ternary optical computing, but that has other issues. 

However, the most obvious fundamental logic state set in DF cart logic is "no cart, cart" which is a natural mapping to "0, 1" binary bit.  A more complex design could use "north-heading cart, stationary or no cart, south-heading cart" as a trit, or if you zoom out slightly and consider the storage loop the basic memory cell you could have "counter-clockwise cart, stopped cart, clockwise cart" as your trit; something similar has been hypothesized for superconducting loop storage. 

Of course, a true Dwarven computing device would be in base 8 (0,1,2,3,4,5,6,7), as every dwarf knows that that's the fundamental way the universe works.  An... octary? computing device would be a true megaproject!  More realistically, however, four binary bits stage easily up to base 8 (a nibble), while it would be much harder to do that with ternary.  Aiming for a one octal digit (4 bits) adder is probably a good starting point for binary computing cart logic designs, and then working up from there (carry bit, multiple digits, subtraction, and so on). 
Logged

rtg593

  • Bay Watcher
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1051 on: April 25, 2012, 09:30:43 am »

Guys, you're way overthinking the memory cell. It's very easy.

Roller-pressure plate-roller. 2 carts, 1 full, one empty. Set the plate to read one or the other, rollers shift carts back and forth between 2 positions. Closest thing to a binary memory cell you can get.

EDIT: with a toggled gear to one roller, you can make a very simple repeater, as well, toggling the carts back and forth every time the plate disengages/reengages. no, cart going in a circle is easier.
« Last Edit: April 25, 2012, 09:33:41 am by rtg593 »
Logged
Is it because light travels faster than sound,
that people appear bright until you hear them speak?

zach123b

  • Bay Watcher
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1052 on: April 25, 2012, 10:23:23 am »

could make a ramp with a booster and have it cradle over a pressure plate, maybe several plates, possible but maybe not logical

could make it have 5 states, n/s/e/w/standstill by bridges and boosters

probably easier to have a tree logic kind of system, easiest if carts can't take up the same spot; using dead ends, bridges, boosters and pressure plates
Logged
"IT'S WORLDGEN TIME!"
"No, Meph, No!"

Kel

  • Bay Watcher
  • [EXPLODABLE][MAGMA_DEPENDENT]
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1053 on: April 25, 2012, 11:34:23 am »

From previous page: I like the sound of a mechanical laser! Fear me goblins!
*ahem*
The loaded/unloaded cart is a good way to do a memory cell, though it might be fiddly making sure the weight is set up correctly. 'Tapes' could probably work on the same principle of loaded/unloaded carts... although Idk how useful they'd be compared to just sending one cart down a track with a bunch of pressure plates linked as necessary.

...hey, we could create dwarven movies! Send a cart down a track with a bunch of pressure plates on it, with each new pressure plate updating the status of a set of 10x10 doors appropriately. Would require careful timing/latches so the deactivating of the previous pressure plate doesn't get in the way of the activating of the next. Hmm... I can think of a way of doing 3-colour displays:

Spoiler (click to show/hide)

As for sorting carts by weight:

Spoiler (click to show/hide)
Logged
You don't need a parachute to skydive. You only need a parachute to skydive twice.

"I still say a church steeple with a lightning rod on top shows a lack of confidence."

Tribes: Ascend is pretty good. Check it out here:
http://tinyurl.com/KelTribes

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1054 on: April 25, 2012, 11:57:57 am »

that's exactly what i posted yesterday, except that your has ramps instead of rollers.  it's likeley that all objects will accelerate the same going downhill, assuming toady will use a vastly simplified model for friction.

I like the idea of a tape, though.  It could be a string of minecarts moving along, the rear one pushing the whole string. This would even be a case where ternary simplifies things (empty displays top plate, light load displays lower plate, heavy load displays liquid underneath).  As someone mentioned earlier, it might be fiddly to separate the front cart from the rest for analysis, though.
« Last Edit: April 25, 2012, 12:03:39 pm by Sadrice »
Logged

Kel

  • Bay Watcher
  • [EXPLODABLE][MAGMA_DEPENDENT]
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1055 on: April 25, 2012, 12:42:41 pm »

Ahh, silly me for using ramps instead of rollers. If DF uses real-world physics, I think using ramps would mean all the carts end up in the same place... yes, assuming rollers impart a force, not a velocity, then they should be used.

And yes, I know the idea of a weight-separator was brought up earlier, but I don't think anyone mentioned the levels-with-different heights as being where you the pointed the thing. Not that I saw, anyway. Apologies if you did. :)
Logged
You don't need a parachute to skydive. You only need a parachute to skydive twice.

"I still say a church steeple with a lightning rod on top shows a lack of confidence."

Tribes: Ascend is pretty good. Check it out here:
http://tinyurl.com/KelTribes

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1056 on: April 25, 2012, 01:17:58 pm »

I was thinking about height levels when i wrote it, but it looks as though i didn't actually mention them.  And no! Totally unacceptable!  Every post in this thread contained fresh and original ideas that had never even been thought of before, until you came and RUINED it!  RUINED!  I sentence you to 500 hammer strikes with a featherwood training hammer.
Logged

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1057 on: April 25, 2012, 01:42:02 pm »


Of course, a true Dwarven computing device would be in base 8 (0,1,2,3,4,5,6,7), as every dwarf knows that that's the fundamental way the universe works.  An... octary? computing device would be a true megaproject!  More realistically, however, four binary bits stage easily up to base 8 (a nibble), while it would be much harder to do that with ternary.  Aiming for a one octal digit (4 bits) adder is probably a good starting point for binary computing cart logic designs, and then working up from there (carry bit, multiple digits, subtraction, and so on).

An Octal digit is only 3 bits, but otherwise yeah.

I was thinking of the 'Newtons Cradle' effect to store bits:

4 enclosed track tiles, > and < are rollers, P's are pressure plates, carts are not shown.

>PP<

0's are carts, overlayed on the above configuration:

">0P0"  is one state, when triggered the rightmost roller shoves it's cart into the the other cart, knocking it onto the other roller, ending up with "0P0<"

Trigger the other roller to set the bit the other way, potentially could get stuck in a bad state "0PP0", "00P<" ">P00" or "0PP0" however.

Also might need more run up space to knock the other cart off it's position: ">>PP<<"
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1058 on: April 25, 2012, 02:50:35 pm »

 I don't quite understand your design, so this might be the same thing, but you could do it like this:
Code: [Select]
# - wall
A and B - pressure plates
0 - cart

No carts:
#>===AB===<#

State 0
#0===A0===<#

Power is provided to the lefthand roller, flipping it to:
State 1
#>===0B===0#

Powering the righthand roller would reset it to 0

It could be made with separate write and clear inputs by linking the rollers to separate inputs.  Powering the righthand roller when it is in state 0 would do nothing.
It could be made with a single input that sends a toggle signal by linking both rollers to the same input, though you would need to make sure the rollers are unpowered by the time the cart reaches the other side.

This all assumes momentum transfer is complete, and the cart stops dead while the other one moves on.

I also just thought of a way to separate the front cart from the newton's cradle queue.  Slam a cart into the back of the queue to knock the front cart forward, onto the pressure plate.  The hammer cart would have to be distinguishable from data carts by being a different weight, so when one gets dequeued it can be directed away from the reader and another hammer cart launch, to get the real data cart.  If you let your queue get totally filled with hammer carts, it will enter an infinite loop.

You could also make a stack data structure in the same way, but with the input and cart reader as different branches off the same side, with the hammer carts coming in from opposite.  When you push a cart, the hammer cart that comes off gets sent back around to be reused, and when you pop one, a pressure plate aperatus sends any cart going that direction into the cart reader, rather than back into the input.  Just don't run out of hammer carts or you will start losing data.

The hatch display mentioned earlier would benefit from a circular queue that uses the last data cart as the hammer cart.  For speed and viewability you would probably have to make a separate queue to control each pixel.  With enough spare time (probablt way less than is required to build a decent fluid logic adder) you could build a display that plays a looping animation, or if the data carts are sent to separate storage rather than looped back around as hammer carts, any one of several selectable animations.
Logged

rtg593

  • Bay Watcher
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1059 on: April 25, 2012, 03:15:49 pm »

From previous page: I like the sound of a mechanical laser! Fear me goblins!
*ahem*
The loaded/unloaded cart is a good way to do a memory cell, though it might be fiddly making sure the weight is set up correctly. 'Tapes' could probably work on the same principle of loaded/unloaded carts... although Idk how useful they'd be compared to just sending one cart down a track with a bunch of pressure plates linked as necessary.

...hey, we could create dwarven movies! Send a cart down a track with a bunch of pressure plates on it, with each new pressure plate updating the status of a set of 10x10 doors appropriately. Would require careful timing/latches so the deactivating of the previous pressure plate doesn't get in the way of the activating of the next. Hmm... I can think of a way of doing 3-colour displays:

Spoiler (click to show/hide)

As for sorting carts by weight:

Spoiler (click to show/hide)

Memory cell wasn't toggled by weight, but by load. Toady said plates can be set for empty vs full.
Logged
Is it because light travels faster than sound,
that people appear bright until you hear them speak?

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1060 on: April 25, 2012, 03:23:09 pm »

He said they could be used for that, I don't think he was very specific about exactly how it's implemented.
Logged

FearfulJesuit

  • Bay Watcher
  • True neoliberalism has never been tried
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1061 on: April 25, 2012, 07:48:00 pm »

If you're going to go for a ternary system, wouldn't full cart (1), empty cart (0), no cart (-1) make sense?
Logged


@Footjob, you can microwave most grains I've tried pretty easily through the microwave, even if they aren't packaged for it.

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1062 on: April 25, 2012, 08:07:55 pm »

It would, but it would be hard to implement.  Your system would have to very regularly timed, so it would know when the cart's supposed to show up, and it would have to somehow notice that the cart never showed up.  If the pressure plates are weight based, a weight system would be easier to implement, though you may need dwarves to manually load and unload carts.
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1063 on: April 25, 2012, 08:14:34 pm »

Quote from: Devblog
(if there's a wall blocking the way the cart would fly off, it will stay on)

Adjust your railgun designs accordingly. If the cart is encased it will keep going around the loop. We know from previous discussion that if there is a only a small gap then mine carts can derail and reattach to the tracks. Perhaps this will be an option:

Code: [Select]
/-HHH-\
|     |
|     |
\-----/

With H being a hatch.

If this circle is walled in, perhaps with a hatch above to deliver the next cart and the hatches drop open, wouldn't that launch the cart at MAXIMUM velocity, since the cart can't derail on those corners?

Why hatches? Assuming that a cart can't derail into a closed door/bridge/floodgate, you could do this:

Code: [Select]
/-----\d
|     |
|     |
\-----/

where d is a door. The cart must be travelling clockwise in this example. New carts are jumped down from above with a slight forwards speed, enough to reach the rollers and get moving. You could possibly add a number of carts to the loop equal to half the length of the loop.

This isn't a laser. It's closer to a particle beam weapon.

rtg593

  • Bay Watcher
    • View Profile
Re: Holy Crap Minecarts (Devlog Quote)
« Reply #1064 on: April 25, 2012, 08:49:13 pm »

Quote from: Devblog
(if there's a wall blocking the way the cart would fly off, it will stay on)

Adjust your railgun designs accordingly. If the cart is encased it will keep going around the loop. We know from previous discussion that if there is a only a small gap then mine carts can derail and reattach to the tracks. Perhaps this will be an option:

Code: [Select]
/-HHH-\
|     |
|     |
\-----/

With H being a hatch.

If this circle is walled in, perhaps with a hatch above to deliver the next cart and the hatches drop open, wouldn't that launch the cart at MAXIMUM velocity, since the cart can't derail on those corners?

Why hatches? Assuming that a cart can't derail into a closed door/bridge/floodgate, you could do this:

Code: [Select]
/-----\d
|     |
|     |
\-----/

where d is a door. The cart must be travelling clockwise in this example. New carts are jumped down from above with a slight forwards speed, enough to reach the rollers and get moving. You could possibly add a number of carts to the loop equal to half the length of the loop.

This isn't a laser. It's closer to a particle beam weapon.

Lasers bounce back and forth between 2 mirrors picking up energy from a crystal, gas, etc. Once it has sufficient energy, it breaks through partly transparent emitter mirror and is released. That's the mechanic I was comparing this system to.

Edit: but ya, a closed loop charging system for a particle beam would be a better analogy.
« Last Edit: April 25, 2012, 08:51:04 pm by rtg593 »
Logged
Is it because light travels faster than sound,
that people appear bright until you hear them speak?
Pages: 1 ... 69 70 [71] 72 73 ... 95