SITE ANNOUNCEMENTS:
  • The DF2010 namespace has been renamed to "v0.31", and all articles for version 0.34 should be placed in the new "DF2012" namespace.
  • Please report vandalism at DF:AIV
  • View Centralized discussion - A place to find any wiki-related discussion and get involved.
  • New users - if you need a page created (like a user page, for instance) please create a request at Emily's talk page.
  • A wiki dump is now automatically generated every day and is available at http://dwarffortresswiki.org/images/dump.xml.bz2.

DF2012:Computing

From Dwarf Fortress Wiki
(Redirected from Computing)
Jump to: navigation, search
v0.34.09 · v0.31.25 · v0.28.181.40d · v0.23.130.23a
This article is about the current version of DF.
Dwarven Computing at its best: this calculator has more processing power than twenty dwarves combined! However, that's not really saying much.

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. Even if it isn't a young concept anymore, there is still much room for improvement and development. One reason is that there are many ways to solve one problem. Innovation and invention are encouraged.

Contents

[edit] Binary information

Binary information can have one of two possible states: true or false, respectively 1 or 0. In dwarf fortress they can be represented by different entities:

Electronic devices and computers base on this elementary form of information, and if you want to go into computing, you’ll have to familiarize yourself with it. propositional calculus

[edit] Input/Output

Input can be any device which can be linked to another device with mechanisms, such as levers or pressure plates. Pressure plates can measure water, magma, or creature weight, and can be set to react to your own dwarves if measuring creature weight. If measuring water or magma you specify the minimum and maximum levels at which it should output 'on', and at all other levels it will output an 'off' signal. Regardless of the actual amount of water, magma, or creature weight on your pressure plate, the plate can only output an 'on' or 'off' signal (1 or 0) to whatever devices it is linked to. So everything you build will have a binary base.

[edit] Input elements

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. In some special configurations - when mechanical logic is involved - output may not be a on/off signal but power, thus running or not running a machine component.

Currently to convert from power to an on/off signal, the only way is to use a kind of power to signal converter, a screw pump connected to that power source, and a pressure plate to measure whether water is being pumped.

[edit] Output elements

[edit] 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.

input A NOT
0 1
1 0

input A input B AND OR XOR NAND NOR NXOR
0 0 0 0 0 1 1 1
0 1 0 1 1 1 0 0
1 0 0 1 1 1 0 0
1 1 1 1 0 0 0 1

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. Designing each individual gate that you will need (or using designs that had each individual gate designed) rather than building a gate out of multiple NAND gates or the like will generally result in your dorfputer reacting faster and using less resources (power, water, kittens, construction materials, what-have-you).

[edit] Complex gates

[edit] Disciplines

There are 3 main disciplines of dwarfputing, depending on what would drive the dwarfputer. Each of them has its assets and drawbacks.

The three disciplines are:

[edit] Fluid logic

Fluid logic is controlling the flow of fluid over different pressure plates. Fluid logic can be easily constructed and every known logic gate in dwarf fortress has already been built with it. On the other hand this discipline depends on a somehow unlimited source of the used fluid to deal with its evaporation and destruction.

[edit] Mechanical logic

Mechanical logic uses systems of axles and gear assemblies to build logical gates. Mechanical logic reacts very fast and can be easily constructed, except for the need for a fluid-pump-based power->signal converter in every gate. Since every gear can itself be linked to a trigger (or multiple triggers), and automatically connect to adjacent gears for transferring either power or load, mechanical logic gates are very flexible and don't require anywhere near the number of different devices that tend to be used in fluid logic gates (except, again, for the requirement for a fluid-pump-based power->signal converter in every gate, unless you intend to use it to control a pump). On the other hand this discipline uses a LOT of mechanical power, and due to the lack of a power->signal converter, also referred to as a "rotation sensor" (a device to convert from power to on/off link signals), you need to build one using fluid logic components if you want to connect multiple mechanical logic gates together or connect a mechanical logic gate to any output other than a pump. There is, however, now a fully functional fluid preserving rotation sensor design. So, in truth, current mechanical logic is more correctly termed mechanical-fluid hybrid logic, as you need some source of fluid to "prime" the rotation sensors your design will need. Along with new techniques to construct logic gates by "pre-toggling" a gear assembly (see Pre-Toggled Mechanical Logic), any logical circuit can be built, given enough space in the game to do it.

[edit] Creature logic

Creature logic uses pressure plates and constraints on creatures' movement through buildings such as doors and hatches, in conjunction with their pathing behavior, to build logical gates. Creature logic is very space intensive, but requires no power, fluid, or valuable materials. Every kind of logical circuit can built with creature logic.

Animal logic is a special kind of creature logic that relies on animals attempting to path through tightly closed doors. Animal logic circuits can be much more space efficient that other forms of creature logic, but is somewhat unreliable.

[edit] Examples of things you could do with logic gates

[edit] 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.

[edit] Useful

[edit] Concepts

[edit] Such a doddle


[edit] Related user pages


Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages
Advertisement