Behavior Programming: Difference between revisions

From Desynced Wiki
No edit summary
mNo edit summary
Line 10: Line 10:
'''Registers''', '''parameters''' and '''variables''' are a key element to the game and especially so for making any good use of behaviors.
'''Registers''', '''parameters''' and '''variables''' are a key element to the game and especially so for making any good use of behaviors.
In short, all three are essentially one and the same: a place to store and recall information.
In short, all three are essentially one and the same: a place to store and recall information.
* A register is the inputs and outputs of components. When you assign a {{IL|Fabricator}} to produce {{IL|Metal Bars}}, you are interacting with the first register. The {{IL|Fabricator}} then assigns the second register to {{IL|Metal Ore}}.
* A register is the inputs and outputs of components. When you assign a {{IL|Fabricator}} to produce {{IL|Metal Bar}}s, you are interacting with the first register. The {{IL|Fabricator}} then assigns the second register to {{IL|Metal Ore}}.
** Another example is the visual register on the unit registers interface below the component registers.
** Another example is the visual register on the unit registers interface below the component registers.
* A parameter is created from within a behavior - on the top left of the editor, you will see a - and a + sign. You can create as many or as few as you deem necessary. The main benefit of doing so is so that you can pass information into and out of a behavior without using any unit registers.
* A parameter is created from within a behavior - on the top left of the editor, you will see a - and a + sign. You can create as many or as few as you deem necessary. The main benefit of doing so is so that you can pass information into and out of a behavior without using any unit registers.
* A variable is exclusively for use inside a behavior and it serves as a quicker way of creating information storage that is visually recognizable at a glance. If you have any instruction with an output, you can create a new variable - they are alphanumeric, so the first is A, then B, etc.
* A variable is exclusively for use inside a behavior and it serves as a quicker way of creating information storage that is visually recognizable at a glance. If you have any instruction with an output, you can create a new variable - they are alphanumeric, so the first is A, then B, etc.
====== Components and their corresponding instruction analogs ======
One objective of the game is to enable the user to choose whether or not they wish to interact with behaviors. It isn't strictly necessary to enjoy or progress through the game to do so, but you're here now so you've made your choice.
The game provides analogs of components in the form of instructions within behaviors. One of these is the {{IL|Portable Radar}} and another is the {{IL|Signal Reader}}.


Obtaining and utilizing a {{IL|Signal Reader}} or Read Signal for item delivery or mining
Obtaining and utilizing a {{IL|Signal Reader}} or Read Signal for item delivery or mining


Using Compare Number to determine outcomes
Using Compare Number to determine outcomes

Revision as of 11:55, 19 August 2023

Taking volunteers to write short guides on putting together a few simple behaviors.

Try not to add layers of complexity - creating a guide for something that can be improved upon will allow the student to reinforce the existing knowledge you have given them.

We need roughly 5 good examples

Good subjects may be:

Utilizing Parameters for passing information into and out of a behavior

Registers, parameters and variables are a key element to the game and especially so for making any good use of behaviors. In short, all three are essentially one and the same: a place to store and recall information.

  • A register is the inputs and outputs of components. When you assign a Fabricator to produce Metal Bars, you are interacting with the first register. The Fabricator then assigns the second register to Metal Ore.
    • Another example is the visual register on the unit registers interface below the component registers.
  • A parameter is created from within a behavior - on the top left of the editor, you will see a - and a + sign. You can create as many or as few as you deem necessary. The main benefit of doing so is so that you can pass information into and out of a behavior without using any unit registers.
  • A variable is exclusively for use inside a behavior and it serves as a quicker way of creating information storage that is visually recognizable at a glance. If you have any instruction with an output, you can create a new variable - they are alphanumeric, so the first is A, then B, etc.
Components and their corresponding instruction analogs

One objective of the game is to enable the user to choose whether or not they wish to interact with behaviors. It isn't strictly necessary to enjoy or progress through the game to do so, but you're here now so you've made your choice. The game provides analogs of components in the form of instructions within behaviors. One of these is the Portable Radar and another is the Signal Reader.


Obtaining and utilizing a Signal Reader or Read Signal for item delivery or mining

Using Compare Number to determine outcomes