Game Development Reference
In-Depth Information
Probabilities can be represented as percentages (for example, 20%) or weights indi-
cated by single numbers (for example, 1 or 3). In the first case, a resource flowing
into a gate will have a probability equal to the percentage indicated by each output.
The sum of these probabilities should not add up to more than 100%. If the total is
less than 100%, there is a chance that the resource will not be sent along any output
and be destroyed instead. In the case of weights, the chance that a resource will flow
through a particular output is equal to the weight of that output divided by the sum
of the weights of all outputs of the gate. In other words, if there are two outputs,
one with a weight of 1 and the other with a weight of 3, the chance that a resource
will flow out the first one is 1 in 4, and the chance that it will flow out the second
one is 3 in 4.
Gates with probable outputs can be used to represent chances and risks. For exam-
ple, in Risk players put armies in danger to gain territories. This type of risk can be
represented easily by a gate with probable outputs indicating the rates for success or
failure.
An output is conditional when it is labeled with a condition (such as >3 or ==0 or
3-5). In this case, all conditions are checked every time a resource arrives at the gate,
and one resource is sent along every output whose condition is met. The conditions
might overlap; this can lead to duplication of resources or, when no condition is
met, to the destruction of the resource.
Like pools, gates have four activation modes: Gates can be passive, interactive, or
automatic, or they can be a starting action. Interactive gates have a double outline,
automatic gates are marked with a star, and gates that are activated once before the
diagram starts are marked with an s . When a gate has no inputs, it triggers every
time it fires. This way gates can be used to produce triggers either automatically or
in response to player actions.
Gates have one of two distribution modes: deterministic distribution and random
distribution. A deterministic gate will distribute resources evenly according to the dis-
tribution probabilities indicated by percentages or weights if it has probable outputs.
When it has conditional outputs, it will count the number of resources that have
passed through it every time step and will use that number to check the conditions
of its outputs. (It can be convenient to think of a deterministic gate with condi-
tional outputs as a counting gate.) A deterministic gate has no special symbol and is
represented as a small open diamond.
T IP When you place a
gate in a machinations
diagram in the tool, you
may set the gate's type
by clicking one of the
Type icons in the side
panel. The hollow dia-
mond (the default) is a
deterministic gate. The
die symbol converts it
to a random gate.
A random gate generates a random value to determine where it will distribute incom-
ing resources. When it has probable outputs, it will generate a suitable number
(either a value between 0% and 100% or a number below the total weights of the
outputs). When its outputs are conditional, it will produce a value between 1 and 6
to check against the conditions, just as if the diagram rolled a normal six-sided die
(later we will show you how this value can be changed to represent other types of
random distribution). Random gates are marked with a die symbol.
 
Search WWH ::




Custom Search