Nodes

    Documentation

    Delays & Queues

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

    You can adjust the properties of a selected Delay, such as Label, Trigger, Action, Style, and Position, in the Properties panel on the right.

    As with any other Node in a Machinations diagram, Delays can be passive (default), interactive, automatic, or enabling (once before a diagram starts), depending on its Trigger Mode.

    Switch between Delay and Queue using the respective button in the Action area of the Properties panel for the selected Delay/Queue.

    success

    Delays (Q) can be used to delay the flow of Resources as they get distributed in your diagram. You can switch between Delay and Queue using the buttons in the Action area of the Properties panel.

    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.

    warning

    The Formula on the Delay’s output connection indicates how many time steps a Resource is delayed.

    Please note that this differs from most Formulas on Resource Connections, which ordinarily represent a flow rate.

    This delay time is dynamic, and can be changed by other elements in the diagram via Formula Modifiers.

    Please play the below Delay example diagram Step by Step. Notice the counter in the play bar (next to the Reset Button) and the flow of Soldiers through the model. It takes 5 time Steps to train a Soldier.

    Here’s the step-by-step rundown:
    Step 1: 3 Gold are converted into a Soldier & sent to the Training facility (Delay node).
    Step 2: First Soldier is in training (delayed), and a second one is commissioned  
    Steps 3 – 5: both Soldiers are in training (delayed).
    Step 6: First Soldier is pushed to the Soldiers’ Pool. The second is still in training.
    Step 7: Second Soldier is sent to the Soldiers’ Pool.

    info

    Other elements in the diagram can change the Delay setting through Formula Modifiers or triggers.

    You may also specify a random delay time using the dice notation or custom variables.

    Check out the Buffer diagram below.

    Here’s the step-by-step rundown:
    Step 1: 3 Gold are converted into a Soldier & sent to the Training facility (Delay node).
    Step 2: First Soldier is in training (delayed). The State Connection checks if the Delay is empty. As long as not empty, the Converter will be disabled, and no more soldiers can be trained.  
    Steps 3 – 5: both Soldiers are in training (delayed).
    Step 6: First Soldier is pushed to the Soldiers’ Pool. The second is still in training.
    Step 7: Second Soldier is sent to the Soldiers’ Pool.

    success

    Queues (Q) processes only one Resource at a time. Switch between Queue and Delay using the respective button in the Action area of the Properties panel.

    In the Queue example below, play the diagram (Step by Step). In this case, orders from Build are queued and processed one at a time every 5 Time Steps.

    Step-by-step rundown:
    Step 1: Three Gold are converted into a Soldier & sent to the Training facility (Queue)
    Step 2: Initial Soldier is being trained (queued) for 1 step. Another three Gold are converted into a Soldier & sent to the Training facility (Queue), but their training is not started
    Step 3-5: the first Soldier is being trained & the second Soldier awaits in queue
    Step 6: the first Soldier gets pushed to the Soldiers’ Pool & the second Soldier starts their training
    Step 6-10: second Soldier is in training
    Step 11: the second Soldier gets pushed to the Soldiers’ Pool

    info

    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).

    See diagram below.

    Contents

    All Rights Reserved © Machinations S.àr.l

    8217, Mamer, Luxembourg, accounts at BGL BNP PARIBAS, VAT number: LU30464284

    We use cookies for marketing and analytics. We also share information about your use of our site with our marketing and analytics partners who may combine it with other information that you’ve provided to them. You consent to our cookies if you continue to use our site. Learn more