- Easy Level Progression
- Loot & Craft
- Increase base stats
- Balancing difficulty and score
- Level progress planning
- Infinite Runner Game Loop
- Modelling a Gacha Box
- Balancing a Battle Pass
- Artificial Player
- Balancing a Hyper casual game
- Player Skill
- Web3 - Constant Product Market Maker
Unity Plugin (UP) & API
Account & Billing
Resource Connections (C) transfer Resources between Nodes and are essential when building a game or system that requires the movement of Resources from point A to point B.
You can adjust the properties of a selected Resource Connections, such as Label, Formula, Interval, Transfer, Resource color, Limits, Style, and Position, in the Properties panel on the right.
We will talk about properties unique to Resource Connections below.
You can add descriptive text or annotations in the Label field. This will make it easier to identify the purpose of the connection. It is also good practice and will make your diagram more accessible to others.
Resource Connections can transfer Resources at different rates. The Formula on the Resource Connection indicates how many Resources are transferred. This field accepts the input of integer values, Custom Variables, and functions from the math.js library in the Formula field.
Please take a look at our Formulas article to learn more about this powerful feature.
You may transfer an unlimited number of Resources in a single time step by using
all as the Formula.
Resource Connection will blink if there are not enough Resources to be transferred or if the Resources available can’t be accepted by the Target (e.g., in a color-coded diagram).
Machinations diagrams do not handle fractional values.
To emulate fractional values, you can express your game’s Resources in sub-units so that
1 sub-unit = 1 Resource
An analogy for this would be working with the amount in ¢ (cents) instead of the amount in $ (dollars). To work with transferring 3.14 Resources, you’d need to multiply the whole flow by 100, resulting in 314 Resources.
The Interval determines the number of Steps between transfers. If you want a Node in your diagram to be activated less than every Step, intervals are your best friend.
You can use this if your model requires transferring Resources every “x” Steps. E.g.: Formula = 1; Interval = 3 means 1 Resource is transferred every 3 Steps.
Please look at our Interval article to find out more.
The transfer of Resources between Nodes can be set to Interval (default) or Instant.
Interval: All Resources are transferred individually within 1 Step. If more Resources are being transferred between 2 Nodes, each will be treated as individual entity. The changes to the state of the target Node will be updated for each Resource that consecutively reaches its target (within the same Step).
Instant: All Resources are transferred simultaneously, at the beginning of the Step.
This is an important thing to take into account if you have Nodes that are influenced by state changes on your diagram. Here’s an example.
In the examples above, the values of the Registers change simultaneously with the values in the Pools. When you hit Play, the Pool and Register on the left model take the Speed set for the transfer (3 seconds) into account, whereas the Register in the right example is instantly updated to 10.
In the left example (red), where the Resource Connection is set to
interval, the Register will gradually reach five, and the execution will stop mid-way, due to the End Condition being triggered.
In the example on the right (blue), the transfer happens instantly at the beginning of the Step, so all 10 Resources reach their Target, and the End Condition never triggers.
State Connections can filter specific colors (Black, Blue, Green, Orange, Red). You can use this if your model requires the Resource Connection to transfer only a specific type of Resource.
You can find out more about this in our Filter [Color coding] article.
Use the Shuffle Origin option in a Resource Connection’s Properties panel to randomize the transfer of differently colored Resources coming from the same origin Node.
By default, Resources from multiple Sources are transferred according to the LIFO principle (last in, first out). When using Shuffle Origin, Resources will be transferred randomly from their origin to the target Node.
To emphasize, in the example above, we used the Color Filter.
You can limit the amount of Resources being transported by setting a minimum and maximum limit.
In the example below the Resource Connection is set to move 10 Resources from the Source to the Pool. However, due to its Limit being set to a maximum of 3, only 3 Resources will be moved.
In the examples above, the Registers change along with the state changes the Pools go through.
In the red example, where the Resource Connection is set to
interval, the Register will gradually reach 5 and the execution will stop mid-way, due to the End Condition being triggered.
In the blue example, the transfer happens instantly, at the beginning of the Step, so all 10 Resources reach their Target, and the End Condition never triggers.
Notice: When you hit Play, the Pools and Registers on the right are instantly updated to 10, whereas the example on the left takes into account the Speed set for the transfer (3 seconds).
You may use various styles to organize, emphasize, or highlight certain game system elements. However, using these, especially stroke color, does not affect the flow rate of a Resource Connection.