Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Urist McMarconi cancels send wireless message: blown apart by *silver minecart*  (Read 4403 times)

Larix

  • Bay Watcher
    • View Profile

This didn't actually happen, but i built a "wireless" communication system in a fort. It sends messages between two partial forts which have no walking connection and thus also no shared mechanism links.

Information is sent via minecart, obviously. The exact information is transmitted by the minecarts' weights and decoded via pressure plates tuned to respond to the specific carts. As mentioned elsewhere, there are eleven distinguishable minecart weights. One cart is required for the "done" signal, so that leaves us with ten bits of space per message sent. Each individual bit in the message is represented by the presence or absence of the minecart in question, so sending the finisher cart alone actually sends 0000 0000 00. Sending carts one, two, five, seven and nine (and the finisher) sends 1100 1010 10.

Of course, to make the operation reasonable, a fair bit of auxiliary machinery was required. I wanted the message entered in one go and sent as a "package" instead of issuing each bit individually and wait for it to be sent before sending the next. This required a "dispatcher" to turn the lever-pulls at the main controls into a properly spaced sequence of launch signals.



Not very transparent, i'm afraid. Visibility doesn't exactly profit from it being built in the middle of a kimberlite vein and halfway over an older dysfunctional (too tightly spaced) design. Each lever opens one hatch cover (or not, if it is "off"). The dispatcher cart checks each ramp/hatch combination and if the hatch is closed, it bounces back out and is sent to the next without sending a launch signal. If the hatch is open, the cart passes through, activates the pressure plate sending the launch, bounces against a wall, back into the ramp-pit and out and to the next pit. This provides enough distance between the actual signalling carts so that they can eventually file back into their proper positions.

The signal carts sit each on their own individual hatch, which gets opened by the launch signal from the dispatcher. There's a bit of spacing provided because the carts that get started first in the sequence have the shortest distance to the main launch rail:



Quite simple, just a bunch of (SE) impulse ramps. The cart enters on the westernmost ramp, which is EW to guarantee a uniform starting speed. The ² things at the eastern end, where a proper ramp launches carts into the air, are the remains of a cat that got curious at the wrong time. Poor thing completely disintegrated.

The carts are sent off at somewhere in excess of two tiles per step, travel along a ballistic arch with an apex at z+17 (i have a picture of a cart in flight, but well, it's just a screenfull of empty space with a lone minecart) and lands about 90 tiles east of the ramp, here:



If you squint really hard, you can see the moat surrounding this sub-fort. Dwarfs cannot cross.
All pressure plates on the southern "incoming" path are weight-sensitive, ranging from 1-800kg for the first to 50-100 for the last. Each plate activates the door two tiles east of it, letting the cart pass, but if the cart is not the right weight, the cart follows the corner, touches the plate on the northward path, takes the next corner sending it west and eventually gets launched back out at the western end, two tiles northeast of the start of the incoming rail. This arrengement is why carts are sent from heaviest to lightest, with the bloodthorn cart as finisher - they can come in less than 100 steps apart, since each lighter cart is supposed to pass all doors passable by heavier carts anyway and thus, no false bits can be set.

In the picture, one cart is in the loop (the nickel one, judging by the plate it just went over) and the plate activated by an earlier cart (presumably lead) is still active - those carts were sent significantly less than 100 steps apart, and the launch for one cart between them was checked but wasn't required by the main controls.

After jumping back, the carts are pulled up two z-levels and sorted through this array of even more hatch-pits governed by weight-sensitive pressure plates:



Once again, the weight-ordering is used to ease the sorting process. Carts enter from the right and the heaviest carts leave on the left, so the plates/hatches are ordered by ascending weight. This was the part that needed the re-build of the dispatcher. I had an earlier design with closer-spaced launches, but that led to carts colliding here.

The plate activations at the reading end of the minecart jumps are first fed into a bunch of set/reset latches



and when the finisher (bloodthorn) cart touches its pressure plate, the main decoder/processor is activated:



Bottom left: a simple delayer - hatch cover/ramp loop holding a cart as long as the hatches are open, sending it over a pressure plate and back to the starting location after 100 steps are up. _This_ signal sends an open to all four floor grates to the middle-north, each holding back a minecart in a ramp-pit. These carts leave their pits after the grates open 100 steps later and pass over the track/bridges directly south of the grates. Two latches govern the positions of these bridges and which of the four carts gets to enter the main processing loop depends on the bridges' positions: there's a currently-retracted bridge immediately south of the grates. Currently, the second cart from the left gets to leave.

The operation cart then goes through eight latch-governed gates, sending signals to the main memory depending on cart weight and hatch positions. After finishing the cycle, the cart goes up to the above level, goes over another pair of bridges working like those below, sending the cart back to its origin pit and in the process sends an open signal to the bridge in the latch array, re-setting the latches.

One of eight cells of the main memory can be seen in the northeast. They're comically large, but can add, subtract, toggle or get set to a specific value.

The four minecarts in the operation loop are of four different weights (of course) and each hatch-gate has three pressure plates. Two are in the branch travelled when the hatch is open -
first plate responds to weights from 200-500, sends an "add" to its memory cell
second plate responds to weights from 400-max, sends a "subtract" to its memory cell

the other is in the branch travelled when the hatch is closed
responds to weights from 1-200, sends a "set to zero" to its memory cell.

Each of those main gates has an added hatch-pit cycle behind it. The hatch in it is triggered by the first and second pressure plates and if open, holds the cart back for 100 steps before it travels to the next gate. That's because carries can be generated in the main memory when adding or subtracting, the delay is supposed to prevent carries from failing to register.

The carts used are from wood (<50), copper (~350), silver (just over 400) and gold (770ish). So the operations are
copper - add
gold - subtract
silver - toggle status of every cell which has been selected, add without carry.

The wooden cart is first sent over a pressure plate which both sends a "set to one" to all memory cells _and_ holds the cart back for a hundred steps before it goes into the operation loop. Thus,
wood - set memory to transmitted bit chain. Sending the blood thorn cart alone sets the memory to zero.

Communication with this machine is one-way, to allow responses, a similarly large contraption would be required going the other way. One byte of information and a two-bit "opcode" take about 300 steps to get through the "dispatcher", each cart takes another ~200 steps to deliver its message, main operation starts another 200 steps after the bloodthorn minecart has come through and takes from 500 to 1500 steps depending on how many bits are set. About two dwarf-days to transmit and rudimentarily process one byte of information, ~3 to 5 mBit/s. It's gonna take a while before dwarfs start sending ballistic weight-encoded porn.
Logged

mosshadow

  • Bay Watcher
    • View Profile

Wow this is so complicated, it makes my head hurt. What can you use it for exactly?
Logged

Di

  • Bay Watcher
    • View Profile

Wow this is so complicated, it makes my head hurt. What can you use it for exactly?
That is not polite question to ask a scientist, you know.  :P
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

Delioth

  • Bay Watcher
  • Mass Gauntlet Wizard
    • View Profile

Have you weaponized it yet?
Logged
Help us write a story!
We're currently setting the scene and world- characters, civilizations, flora/fauna, cities, places, anything setting!
Products of my Boredom (Old)
Quote from: Shawtay
Delioth, you sir, are a wonderful, wonderful person.
When in doubt, Apply Magma

Nuoya

  • Bay Watcher
    • View Profile

Having two completely separated forts is already great material for roleplaying, challenges, and fun. You mentioned that the communication is one way, which obviously implies that the receiving fort ought to be the military special forces that gets contract requests from the nobility/feudal fort. You could also hard-code some messages. Five bits is enough for an alphabet and your machine can send ten bits per use.

Send GO to the mercenary fort, which is also hard-coded to open their drawbridge and drop water in all the bedrooms.
Send OK every now and then during peace time, which drops masterwork roasts into the dining room.
Send TY after they clean up a seige, which is also coded to send full speed minecarts full of gold coins launching their contents into the hallways.
Logged

Larix

  • Bay Watcher
    • View Profile

I'm considering ways of integrating this communication device into the ongoing theme of the divided fort. One possibility would be the inside fort building and maintaining machinery which would be operated remotely by the outside fort, but text-like messages would also be an option. After all, as Nuoya says, five bits can encode the letters of the alphabet.

Many of the parts and concepts that were used have very obvious practical applications. The linear accelerator produces extremely high movement speeds, enough to "blow apart" a cat (and likely anything up to and a bit beyond horse-size when using a metal cart) on impact and keep travelling. Weight-sensitive pressure plates can sort and separate up to eleven empty (and more loaded) carts coming from a shared track. Ballistic paths allow transport of goods between stations without walkable path, at siginificant distances - launch ramp and landing track are over 90 tiles apart, over half a standard-size embark. And with correct ordering, the distance between carts that need sorting into separate signalling tracks and/or moving back into separate loading bays can be a lot shorter than the 100 steps required to re-set pressure plates.
Logged

pumpedupjellos

  • Bay Watcher
    • View Profile

and here I was thinking I built a badass minecart collision system to constantly mow everything in the pit... wow, just wow
Logged

brokegamer

  • Bay Watcher
  • [ALCOHOL_DEPENDENT]
    • View Profile

I don't know what this is but I love it.
Logged
I do let's plays on them there 'tubes.

Chances are if I'm making a post, I'm drunk.

thegoatgod_pan

  • Bay Watcher
    • View Profile

This is amazing. My current fort has two permanently disconnected sections: regular fort and Necromancer palace. It'd be fun to integrate a combined lockdown system: hiding away civilians and releasing the necros and back with the pull of a lever.
Logged
More ridiculous than reindeer?  Where you think you supercool and is you things the girls where I honestly like I is then why are humans on their as my people or what would you?

Larix

  • Bay Watcher
    • View Profile

I had first built a height-powered launcher and after a first test shot to check the range of it, decided to turn it into a remote communication device, since i'd started looking into the computing potential of weight-sensitive pressure plates when working with minecarts. I largely separated the split fort with a trench, then sequestered the next migration wave in there and told them to remove all the ramps to break paths. Only then the work on the receiving/reading loop was started, the two halves of the system were constructed and built completely separately.

The self-imposed challenge was thus to transmit "messages" without lasting connections like shared power and without mechanism linkages between sender and receiver. Weighted minecarts are a very convenient means for this purpose, because each weight can simply be used as stand-in for a bit of a specific position within the transmission "word", making the re-sorting of the returning carts the only timing problem. In theory, since a "zero" is sent by simply not dispatching the cart, this could massively reduce the sending time: as said in the OP, the "finisher" cart dispatched alone sends 0000 0000 00. A different dispatcher loop could finish the sending procedure for this in about 80 steps unpowered, probably just 5 steps with a fairly complicated powered setup. A less time-critical return sorter should be able to handle carts less than ten steps apart, so speeding up the sending even more is conceivable.

Many of the delays which make the whole thing so remarkably slow are due to my building it all entirely unpowered, everything's run by minecarts exclusively, powered largely by a few track ramp glitches.



On this loop, the cart is diverted north on the first door which is closed when it arrives - it's fast enough to jump past corners if there's open space behind them, but if the straight path is blocked, the cart will follow the corner. The pressure plates respond to progressively lower maximum weights, so heavier carts are filtered out first. That's because the carts are launched from heaviest to lightest cart, with the blood thorn cart (the only to trigger 50-100 plates) last, after a lighter wooden cart.

Example: silver minecart, weight a bit over 400
- first plate reacts to 1-800 (excludes platinum only), cart activates it and opens the door, continues straight.
- second plate reacts to 1-700 (excludes gold), door opens
- third plate reacts to 1-500 (excludes electrum), door opens
- fourth plate reacts to 1-450 (excludes lead), door opens
- fifth plate reacts to 1-400 (excludes silver), door stays shut and cart is diverted, touches the output plate in the branch and returns to the west.

All plates activated by an earlier cart are simply "refreshed" by the later cart, due to the weight/sensitivity ordering, there's no signal conflict possible.

The re-sorter



works the exact opposite way - a cart is sent back to its starting position by the first plate activated by it, thus they're sorted (from left to right) from highest to lowest (and to the very right, exclusively blood thorn) activation weight, because once again the heaviest carts will arrive here first, so they should not activate any paths for carts that come in later. The "return when closed" switch logic i used requires a pretty large time distance between two carts, i could have made it much shorter by pathing over the hatches which open when a cart of the right weight arrives:

Code: [Select]
.▼.▼.▼.      .▼.▼.▼.      .║.║.║.
═▼═▼═▼═      ^¢^¢^¢^      ═║═║═║═

Should only require carts to be about 5 steps apart, possibly less. The higher friction of hatches could be a bit of a problem for carts going very long ways.



This time i really used the full potential of this memory cell. There are two in this picture. Each consists of two basic counter cells, connected to each other by a branchable switchover loop. The basic principle of the counter cell/incrementer is the angled three-ramp pit with a single hatch cover: when the hatch is open, carts can pass in two directions unhindered, when the hatch is closed, they converge in the same direction. This can be used for abitrary-length incrementers or this binary memory cell which has multiple functions. The branched switchover loops can generate extra signals, here used as "carry", and because of the built-in branch, this extra signal can be disabled. Thus, the functions are -

open incrementer hatch at zero, disable carry - set to one
open incrementer hatch at one, disable carry - set to zero
open both incrementer hatches, disable both carries - toggle
open both incrementer hatches, disable zero-to-one carry - add
open both incrementer hatches, disable one-to-zero carry - subtract

Putting an activatable door on top of the "output" tile of the incrementer (first tile of the switchover loop) would allow enabling/adressing the cell individually while using a shared main set/reset signal. The cell's state is output via a constantly "held" signal, "examining" the cell (i.e. eliciting a specific signal cycle) would expand it quite a bit more. I experimented with compacting this design, but couldn't come up with substantial improvements; it would be possible to make it a bit smaller, but not much. And i didn't find it worth my while testing an optimised design when i knew this one'd work without tests and i needed no more than eight of them anyway.
« Last Edit: March 19, 2014, 10:48:22 am by Larix »
Logged

Berossus

  • Bay Watcher
    • View Profile

Have you weaponized it yet?

Mh, couldnt you use it to transport maniacal berserk things from the hold of the fort behind/into enemy lines to be unleashed upon/into the enemy?
Some kind of dwaven paratroopers?
Logged
My son, many speak of the honor in war.
My preferred method is to wait until their back is turned, then impale them with a pike held by someone else.
Preferrably from a distance.

Larix

  • Bay Watcher
    • View Profile

Only sane civilians can take a "push track vehicle" job, which includes riding a cart. Anything else can only be sent by first putting it in a cage, shotgunning the cage out of the cart then letting the flying cage slam into another obstacle to shotgun its contents.
Dwarfs riding a flying cart will suffer a collision with the cart when landing. That's usually not fatal, but often breaks bones.

The easiest military application of ridden minecarts is the motorised patrol - a closed track loop with continuous propulsion (rollers or ramps), ridden by dwarfs who are part of an archer squad. They have to be off duty to enter the cart, but can be turned active once they're underway. They'll actively shoot at enemies they can see and seem to have good aim, while they're quite hard to hit by enemy projectiles.
Logged

Magistrum

  • Bay Watcher
  • Skilled Fortresser
    • View Profile

The easiest military application of ridden minecarts is the motorised patrol - a closed track loop with continuous propulsion (rollers or ramps), ridden by dwarfs who are part of an archer squad. They have to be off duty to enter the cart, but can be turned active once they're underway. They'll actively shoot at enemies they can see and seem to have good aim, while they're quite hard to hit by enemy projectiles.
Damn, I had this almost set up at my tower... I didn't knew how to put the dwarves in tough.
Logged
In a time before time, I had a name.

Melting Sky

  • Bay Watcher
    • View Profile

Neat  :)
Logged