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 40d:Computing

Jump to navigation Jump to search

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

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "40d"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

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 2: Line 2:
 
Computing in dwarf fortress is the practice of setting up complex constructions to perform logical operations and calculations, ideally to control some functionality of your fortress, or such a doddle. Even if it isn't a young concept anymore, there is still lots of room for improvement and development. One reason is that there are many ways to solve one problem. Innovation and invention is encouraged.
 
Computing in dwarf fortress is the practice of setting up complex constructions to perform logical operations and calculations, ideally to control some functionality of your fortress, or such a doddle. Even if it isn't a young concept anymore, there is still lots of room for improvement and development. One reason is that there are many ways to solve one problem. Innovation and invention is encouraged.
 
== General ==
 
== General ==
''"So, what is computing? Let's pretend to be stupid ..."'' [http://en.wikipedia.org/wiki/Die_Feuerzangenbowle Die Feuerzangenbowle]
+
<!-- ''"So, what is computing? Let's pretend to be stupid ..."'' [http://en.wikipedia.org/wiki/Die_Feuerzangenbowle Die Feuerzangenbowle]<br /> -->
 
 
 
Concepts of computing in dwarf fortress are far away from what you can call a programmable computer. Even though all necessary components are proven to exist, a construction working like a real computer may be too complex to be built in dwarf fortress. Nevertheless, early computing machines and electronic devices are comparably simple. These concepts can be easily transferred into dwarf fortress. So dwarfputing is more or less a kind of electronics, casting logic in hardware.
 
Concepts of computing in dwarf fortress are far away from what you can call a programmable computer. Even though all necessary components are proven to exist, a construction working like a real computer may be too complex to be built in dwarf fortress. Nevertheless, early computing machines and electronic devices are comparably simple. These concepts can be easily transferred into dwarf fortress. So dwarfputing is more or less a kind of electronics, casting logic in hardware.
  
Line 17: Line 16:
 
Electronic devices and computers base on this elementary form of information, and if you want to go into computing, you’ll have to familiarize with it. [http://en.wikipedia.org/wiki/Propositional_calculus propositional calculus]
 
Electronic devices and computers base on this elementary form of information, and if you want to go into computing, you’ll have to familiarize with it. [http://en.wikipedia.org/wiki/Propositional_calculus propositional calculus]
 
=== Input/Output ===
 
=== Input/Output ===
Input can be any trigger - [[lever]] or [[pressure plate]]. Typically your dwarfs are pulling levers, creatures are walking over your pressure plates, or fluid is covering those plates to initiate computing. The bottom line is you'll always have levers, pressure plates, or a combination of both sending binary signals: on/off.
+
Input can be any trigger - [[lever]] or [[pressure plate]]. Typically your dwarfs are pulling levers, creatures are walking over your pressure plates, or fluid is covering those plates to initiate computing. The bottom line is you'll always have levers, pressure plates, or a combination of both sending binary signals: on/off.<br />
 
+
Note: Although [[pressure plate]]s can be constructed to trigger at different fluid levels, the output will always be just a binary on/off. So everything you build will have a binary base.<br />
Note: Although [[pressure plate]]s can be constructed to trigger at different fluid levels, the output will always be just a binary on/off. So everything you build will have a binary base.
+
<br />
 
 
 
Input elements
 
Input elements
 
* manual: [[lever]] -> binary on/off signal
 
* manual: [[lever]] -> binary on/off signal
 
* triggered: [[pressure plate]] -> binary on/off signal
 
* triggered: [[pressure plate]] -> binary on/off signal
  
According to input, output can be anything that is able to react to an on/off signal. This can be doors, bridges, floodgates allowing or stopping flow, gears controlling pumps and much more. Just refer to the [[lever#On/Off states|lever]] page for a detailed list. Independent of what you finally want to control with your dwarfputer, there are always pressure plates generating this signal. In some special configurations - when [[mechanical logic]] is involved - output may not be an on/off signal but power, thus running or not running a machine component.
+
According to input, output can be anything that is able to react to an on/off signal. This can be doors, bridges, floodgates allowing or stopping flow, gears controlling pumps and much more. Just refer to the [[lever#On/Off states|lever]] page for a detailed list. Independent of what you finally want to control with your dwarfputer, there are always pressure plates generating this signal. In some special configurations - when [[mechanical logic]] is involved - output may not be an on/off signal but power, thus running or not running a machine component.<br />
 
+
<br />
 
Output elements
 
Output elements
 
* signal: [[pressure plate]] -> binary on/off signal -> linkable Object(s)
 
* signal: [[pressure plate]] -> binary on/off signal -> linkable Object(s)
Line 32: Line 30:
  
 
=== Binary logic ===
 
=== Binary logic ===
Basic binary logic takes one or two input bits and creates an output based on them. The devices that perform these operations are commonly called '''logic gates'''.
+
Basic binary logic takes one or two input bits and creates an output based on them. The devices that perform these operations are commonly called '''logic gates'''.<br />
 
+
* NOT - takes one input and returns the opposite of the input<br /><br />
* NOT - takes one input and returns the opposite of the input
 
 
 
 
{| class="wikitable" border=1
 
{| class="wikitable" border=1
 
|-
 
|-
Line 46: Line 42:
 
| 1
 
| 1
 
| 0
 
| 0
|}
+
|}<br />
 
 
 
* AND - takes two inputs and returns true if both inputs are true
 
* AND - takes two inputs and returns true if both inputs are true
 
* OR - takes two inputs and returns true if at least one input is true
 
* OR - takes two inputs and returns true if at least one input is true
Line 53: Line 48:
 
* NAND - takes two inputs and returns true if either input is false
 
* NAND - takes two inputs and returns true if either input is false
 
* NOR - takes two inputs and returns true if both inputs are false
 
* NOR - takes two inputs and returns true if both inputs are false
* NXOR - takes two inputs and returns true if both inputs are identical
+
* NXOR - takes two inputs and returns true if both inputs are identical<br /><br />
 
 
 
{| class="wikitable" border=1
 
{| class="wikitable" border=1
 
|-
 
|-
Line 101: Line 95:
 
| 0
 
| 0
 
| 1
 
| 1
|}
+
|}<br />
 
 
 
The most human-understandable logic system requires NOT, AND and OR gates, but having a design for either a NAND or a NOR gate is enough to build any of the other gates. Some gates are easier to create or need fewer components than others depending on what discipline your logic relies on.
 
The most human-understandable logic system requires NOT, AND and OR gates, but having a design for either a NAND or a NOR gate is enough to build any of the other gates. Some gates are easier to create or need fewer components than others depending on what discipline your logic relies on.
 
=== Complex gates ===
 
=== Complex gates ===
Line 119: Line 112:
 
[[Animal logic]] is like borg logic but uses animals or captured hostiles to trigger pressure plates. Animals have a natural 'follow the leader' tendency and never starve. Hostiles will always target your dwarves and will also need no food or sleep.
 
[[Animal logic]] is like borg logic but uses animals or captured hostiles to trigger pressure plates. Animals have a natural 'follow the leader' tendency and never starve. Hostiles will always target your dwarves and will also need no food or sleep.
 
== Examples ==
 
== Examples ==
There are few examples of a really useful dwarfputer and some concepts which have the potential to become useful for others. But in most cases they are made just for fun. What doesn't mean to diminish their designers achievements, because these are in general the more complex ones. At the moment there are no known examples of animal or borg logic.
+
There are few examples of a really useful dwarfputer and some concepts which have the potential to become useful for others. But in most cases they are made just for fun. What doesn't mean to diminish their designers achievements, because these are in general the more complex ones.<br />At the moment there are no known examples of animal or borg logic.
 
=== Useful ===
 
=== Useful ===
 
* Magma trap
 
* Magma trap
** This is an example of a useful dwarfputer controlling a magma trap. It automatically floods an area with lava, cleans up and resets afterwards. The timing is perfectly adjusted to let the victims vanish only leaving their valuable metal behind.
+
** This is an example of a useful dwarfputer controlling a magma trap. It automatically floods an area with lava, cleans up and resets afterwards. The timing is perfectly adjusted to let the victims vanish only leaving their valuable metal behind.<br />video: http://mkv25.net/dfma/movie-1808-perfectmagmatrap<br />design: http://i576.photobucket.com/albums/ss208/kanddak/magmatrap.png
*** video: http://mkv25.net/dfma/movie-1808-perfectmagmatrap
 
*** design: http://i576.photobucket.com/albums/ss208/kanddak/magmatrap.png
 
  
 
=== Concepts ===
 
=== Concepts ===

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)