Game Development Reference
In-Depth Information
Like intervals, multipliers can also be modified dynamically. Label modifiers that
have an m as a unit of their modification (for example, +2m or -1m) will change
their target's multiplier. For example, the multiplier of the input of the drain A in
Figure 6.6 is controlled by the register B. If you run this diagram in the tool and
click A (an interactive drain), it will attempt to drain two items from the pool, with
a 50% chance of success for each one. If you change the value in the B register, you
can raise or lower the number of items that A attempts to drain.
Just like any other label modifier, a label modifier with an m on its own label trans-
mits the change in the source node. Although the value of register B in Figure 6.6 is
the same as that on the resource connection, it doesn't have to be. If the label modi-
fier's connection were +2m, it would transmit double the change in B.
FIGURe 6.6
a dynamic multiplier
Delays and Queues
In many games, producing, consuming, and trading resources takes time. The
time it requires to complete an action might be crucial for the game balance. In a
Machinations diagram, a special node can be used to delay the flow of resources as
they travel. A delay is represented as a small circle with an hourglass inside ( Figure
6.7 ).
FIGURe 6.7
Producing sol-
diers takes time and
resources.
The label on the delay's output indicates how many time steps a resource is delayed.
(Note that this is different from most labels on resource connections, which ordi-
narily represent a flow rate.) This time is dynamic. Other elements in the diagram
can change the delay setting through label modifiers. You can also specify a random
delay time using dice notation. A delay can process multiple resources simultane-
ously. This means that all incoming resources are delayed for the specified number
of time steps irrespective of the number of resources currently being delayed.
A delay can also be turned into a queue. A queue has two hourglass symbols instead
of one. Queues process only one resource at a time. For Figure 6.8 , this would mean
that only one resource is passed every five time steps.
 
Search WWH ::




Custom Search