v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing User:Larix/MPL/6

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 37: Line 37:
 
In the "spawn" example, the incoming cart will also stop and roll down the ramp if the tile above the ramp is occupied, but the cart which stood there will move off the square and leave to the north. If the place is empty, the incoming cart itself will pass to the north. This "gate", if occupied, "spawns" an additional moving cart, while becoming empty.
 
In the "spawn" example, the incoming cart will also stop and roll down the ramp if the tile above the ramp is occupied, but the cart which stood there will move off the square and leave to the north. If the place is empty, the incoming cart itself will pass to the north. This "gate", if occupied, "spawns" an additional moving cart, while becoming empty.
  
Exploiting jumping carts, a "toggle" gate is also possible:
+
Of course, variations on these concepts are possible: a spawn gate can be combined with a length of track with a standing cart originally placed several tiles away from the ramp. When a series of carts is sent over the ramp, there'll always be an output cart, but the location of the standing cart will keep moving closer to the ramp. Effectively, such a track will "count down" until at zero it spawns a cart rolling off the ramp. Multiple carts can await a collision, and the collision may reconfigure the queue following Newton's cradle principles.  
{{diagram|spaces=yes|\
 
.
 
    O    O   
 
    ╔═    [#000][#ff0]■═   
 
  ▼▼    ═╝   
 
    +    +   
 
    ║    [#000][#0f0]■   
 
  toggle
 
.
 
}}
 
 
 
The operating cart arrives from south, with a speed of 35000+. Since the tile immediately south of the pit is ordinary floor, the cart will not enter the pit but jumps instead. If the SE corner next to the wall is occupied, the operating cart pushes the occupant off around the corner, falls into the pit and accelerates west. If the corner is unoccupied, the operating cart keeps flying until it is stopped by the wall, allowing it to settle onto the corner tile without rolling off. The occupation status of this gate changes to the opposite everytime it is tested. Notably, it produces no output when changing from empty to occupied, but a double output when changing from occupied to empty.
 
 
 
Of course, variations on these concepts are possible: one and the same location can be accessed from multiple sides, under different doctrines - e.g. a delete gate that can be emptied by carts approaching from another direction, operating as a spawn gate for them. A spawn gate can be combined with a length of track with a standing cart originally placed several tiles away from the ramp. When a series of carts is sent over the ramp, there'll always be an output cart, but the location of the standing cart will keep moving closer to the ramp. Effectively, such a track will "count down" until at zero it spawns a cart rolling off the ramp. Multiple carts can await a collision, and the collision may reconfigure the queue following Newton's cradle principles.
 
  
 
=== Pathing and regulation ===
 
=== Pathing and regulation ===
Line 120: Line 106:
 
A lightweight cart is sent into the gate from the south, checking whether location ''a'' is occupied or not. The crucial point is that a very heavy cart is used to occupy the slot. I used a wooden cart as input and a wooden cart full of water, on top of a medium-friction track stop, as "marker". The input cart could never give enough of a push to move the marker off the check location. This gate will thus only ever output the input cart itself, on either of the two output branches, depending on whether or not ''a'' is occupied. Carts can be filled with or emptied of water without needing signals or power, as long as you have an infinite water source available.
 
A lightweight cart is sent into the gate from the south, checking whether location ''a'' is occupied or not. The crucial point is that a very heavy cart is used to occupy the slot. I used a wooden cart as input and a wooden cart full of water, on top of a medium-friction track stop, as "marker". The input cart could never give enough of a push to move the marker off the check location. This gate will thus only ever output the input cart itself, on either of the two output branches, depending on whether or not ''a'' is occupied. Carts can be filled with or emptied of water without needing signals or power, as long as you have an infinite water source available.
  
Where this type of logic looks attractive, is in applications where counting and sequential operations take place. As mentioned, toggling and thus counting by increment should be comparatively quite fast. A count-down track can be used to regulate conditional loops, replacement loops can be used in binary incrementers.
+
Where this type of logic looks attractive, though, is in applications where counting and sequential operations take place. As mentioned, toggling and thus counting by increment should be comparatively quite fast. A count-down track can be used to regulate conditional loops, replacement loops can be used in binary incrementers.
 
 
Signalless circuits can count inputs sent via minecart push, and they can count such signals at speeds much higher than the ~100 steps dictated by pressure plate recovery. The fastest i managed to create is a ternary counter that can handle input periods all the way down to 27 game steps. It sends a "carry" whenever the circuit itself "overflows", on every third input:
 
 
 
{{diagram|spaces=yes|\
 
z+0      z-1 
 
..╔╗     
 
..╔╝      ###
 
..▼      #║# 
 
..▼      #║# 
 
.╔╣#      ### 
 
.║▼ ╔══╗  .╩#####
 
#║▼▼╩▼▼╝  #╦═#╔═#
 
.╚╝ #║    #######
 
}}
 
 
 
The double-ramp pit with return loop to the north, when supplied with one minecart, provides regular pushes to the cart just south of it, with a period of exactly 27 steps. After each push, the oscillating cart accelerates down the ramp going north, reaching a speed of ~ 39.000. It climbs the ramp to the north in a single step thanks to the checkpoint effect, returns through the loop and enters the pit again from the north, accelerating towards the south now. In the end, it delivers a push to a cart standing on the level floor (NSW track) just south of the oscillator pit, with a speed just under 50.000.
 
 
 
The track loop directly south of the oscillator contains two minecarts, one on the tile directly on the oscillator exit, the other in one of three possible positions somewhere on the track loop, depending on the current count.
 
The cart that gets pushed by the oscillator rolls onto the WNE ramp. Since that ramp is connected to wall (N and E) and has exactly one floor connection (W), it accelerates to the west. The southward speed remains unchanged and carries the cart off the ramp and onto the adjacent SEW ramp after three steps, before the westward speed carries it off west. On the SEW ramp, walls are to the S and W, and floor to the east, so acceleration goes to the east now. Thanks to the checkpoint effect, the cart climbs up the ramp to the south in a single step if the southern tile just outside the pit is unobstructed. The cart then properly takes the SW corner, turning around to the west. It pushes the other cart present in the loop and comes to rest on the adjacent square. The second cart finishes the course and comes to rest on the tile south of the oscillator in time to take the next push.
 
 
 
If the secondary counting cart stands on the "exit" tile of the pit, the arriving cart pushes it without leaving the pit. It will then accelerate to the east, passes across the adjacent EW track ramp in a single step (due to checkpoint effect) again and pushes the cart in the ''next'' counting circuit, before it accelerates to the west, climbs the SEW ramp in one step and leaves the pit to the west, coming to rest against the wall there. The circuit has passed on a signal and can accept new input, sending the next "carry" once three more inputs have been received.
 
 
 
This circuit is tailored to the behaviours of colliding carts: the minecart engine keeps track of "sub-coordinates" of a cart on its current tile, and the durations of acceleration and effects of diagonal movement depend very much on these, not directly visible, exact locations. Furthermore, collisions - both with other minecarts and with walls - stop a cart at the very border of its tile in the direction where collision took place. The carts on the oscillator output are practically scraping on the wall, thus the odd WNE ramp: a certain amount of west shift is necessary to enable proper operation.
 
  
 
=== Computing by speed ===
 
=== Computing by speed ===

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: