Delays & Queues

delay and queue up Resource flows

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 - think about all the games out there with a time-based economy.

Delays

In a Machinations diagram, use a Delay Node to delay the flow of Resources as they get distributed in your diagram.

A delay is represented by a small circle with an hourglass inside.

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 ordinarily represent a flow rate.

This time is dynamic, it can be change by other elements in the diagram via Label Modifiers.

In the example below, the diagram is ran time step by time step. Notice the count in the top right corner, and the flow of the Soldiers Resource. It is delayed by 5 time steps.

Here's the step by step rundown: Step 1: Three Gold are converted into a Soldier & sent to Delay Steps 2 - 6: the Soldier is delayed Step 7: Resource get's pushed to the Soldiers Pool.

A Delay can process multiple Resources simultaneously. This means that all incoming Resources are delayed for the specified number of time steps regardless of the number of Resources currently being delayed.

Other elements in the diagram can change the delay setting through label modifiers.

Or you can specify a random delay time using dice notation.

Queues

Delays can be turned into Queues. A Queue has 2 hourglass symbols instead of one.

Queues process only one Resource at a time.

In the example below, the diagram is ran time step by time step. Notice the count in the top right corner, and the flow of the Soldiers Resource. It in this case, orders from Build are queued and processed 1 at a time, every 5 time steps.

Step by step rundown: Step 1: Three Gold are converted into a Soldier & sent to Queue Step 2: Initial Soldier is being Queued for 1 step. Another three Gold are converted into a Soldier & sent to Queue Step 3-5: the first Soldier is delayed & the second Soldier waits in queue Step 6: the first Soldier get's pushed to the Soldiers Pool & the second Soldier starts being delayed Step 6-10: second Soldier is delayed Step 11: the second Soldier get's pushed to the Soldiers Pool

Delays and Queues can use State Connections that communicate the number of Resources they are currently processing (including the number of Resources waiting in a Queue to be processed).

Contents
Delays
Queues