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.

Same Node, 2 actions:

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 changed by other elements in the diagram via Label Modifiers.

🔧 In the example below, notice the count of running steps in the bottom right corner, and the flow of the Soldiers Resource. It is delayed by 5 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 gets 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, notice the counter of running steps in the bottom right corner, and the flow of the Soldiers Resource. In this case, orders from Build are queued and processed 1 at a time, every 5 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 gets pushed to the Soldiers Pool & the second Soldier starts being delayed Step 6-10: the second Soldier is delayed Step 11: the second Soldier gets 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