Game Development Reference
In-Depth Information
hourGlass example
Using pools and resource connections, we can construct a simple hourglass ( Figure 5.9 ).
in this case, two pools are connected by a single resource connection. The top pool (a)
is passive and contains five resources, while the bottom pool (B) is automatic and starts
without any resources. after each iteration, B will pull one resource from a until all
resources have moved from a to B. after that, there are no further changes to the state of
this diagram.
FIGURe 5.9
hour glass example
Time Modes
Games can handle time in different ways. Board games are often turn-based, while
in many video games the game is active even if the player doesn't do anything. To
represent different types of games, a Machinations diagram can operate in one of
three different time modes :
T IP You can set the
time mode of a diagram
in the machinations
Tool by using the Time
mode pull-down menu
visible in the side panel
when no element of the
diagram is selected. in
either synchronous or
asynchronous mode,
you can set the length
of the interval in the
interval box, in units of
a second. The interval
box also accepts frac-
tional values, so 2.5
means each time step
lasts 2.5 seconds.
n In synchronous time mode , all automatic nodes fire at a regular interval that you
can specify for the whole system. All interactive nodes that you click fire at the next
time step, at the same time when automatic nodes fire. In this mode, all actions in
one time step take place simultaneously. It is possible for a user to activate several
different interactive nodes during a time step, but each interactive node can be acti-
vated only once in a time step.
n In asynchronous time mode , automatic nodes in the diagram are still activated at
regular intervals of arbitrary length specified by the user. However, players can acti-
vate interactive nodes at any time within the intervals, and the resulting actions are
executed immediately, without waiting for the next time step. In this case, an inter-
active node can be activated multiple times during a time step. This is the default
setting of the Machinations Tool.
 
Search WWH ::




Custom Search