// Talrey's Guide to Logic Commands

Share your experience by writing tutorials to help other players.
Post Reply
User avatar
Talrey
Entrepreneur
Posts: 89
Location: Garden of the Sun
Has thanked: 8 times
Been thanked: 54 times

Sun Jun 02, 2019 5:59 am

Welcome to version 2.0 of Talrey's Guide to Logic! I was planning on just extending and editing version 1, but the entire logic system has transformed in significant ways, so I decided to start fresh. I'll keep this up to date with future developments unless a drastic shift happens again. Changes will be logged at the bottom of the modified post.

== TABLE OF CONTENTS ==
== CHAPTER 1: Basics of Operation ==

This section will attempt to answer the question of how the Skywanderers logic system operates, as well as provide the groundwork for later exploration of the system's capabilities. I will use the term "circuit" to describe an arrangement of logic components due to the many parallels with real-life electronics, but there is no transmission of power and thus no need for a complete electrical "circuit" as such.

The shortest way to describe Skywanderers' logic system is that it is a "packet-based binary system with instantaneous transmission between tightly-coupled components," but what does that mean? Let's break it down:
  • "packet-based": Each time a logic component wants to update, for example when a switch is flipped, the component decides what the new output value should be and sends a message to the logic network with that value. This is in stark contrast to the kind of system seen in real life and Minecraft, where the output value is a continous emission. However, the system will remember what the last input was, so there's no need to continuously repeat the signal - in effect, the system emulates real-life continuous signals without needing to continuously take up game processing time.
  • "binary system": The system only supports two values, zero and one. I will sometimes refer to zero as a "low" or "off" signal and one as a "high" or "on" signal, a convention taken from the study of electronics in real life.
  • "instantaneous transmission": Every time a packet is sent (that is, a component updates), any connected logic will receive and process that new data within the same game "tick" to update the entire circuit faster than the blink of an eye. This means it can be very difficult to predict which component will activate first when an output is connected to multiple inputs at once. It's easy to deal with this and create predictable ordering with delays, which we'll cover in the next chapter.
  • "tightly-coupled components": In general, a component will only accept one input connection. A Button can flip two Switches, but two Buttons can't flip one Switch. There's a simple way around this, and the next chapter will discuss it at length.
Now that we have some idea of how the system operates "under the hood", we can start building with it. Every logic component is a slightly shortened brick with a symbol on top that indicates what it does. Since the components are bricks, we can fit four of them into the length of one block for a total of 16 per block face. Quite compact, if you choose to build that way. I personally like to put each component in a location and rotation where it becomes easy to "read" the operation of a circuit by following the shapes, but everyone's style is different and there's no wrong way.

There's one last critical step before the system will work, and that's to link it all up. Skywanderers has a dedicated "Link Tool" that looks like a white chevron (>>>) in the menu. This tool is quite handy: not only does it allow us to make and break links between components, but it visualizes all input and output links on a component by clicking on it. To create a link, click on the input component and drag your mouse. A holographic arc will appear and the game will produce a humming sound. The color of the arc, and the pitch of the hum, will change when you drag the mouse to a linkable component. Release the mouse to complete the link - the arc will disappear and you'll hear a chirp to confirm the link. If the link was unsuccessful, you'll hear a buzz instead. To confirm that the link is set, you can click on either component. To delete a link, simply drag from the input component to the output component again as if you were linking it a second time.

In the next chapter, we'll examine each brick component in the system and discuss their operation.

----
Revisions:
01JUN2019 - original post
Last edited by Talrey on Sun Aug 04, 2019 10:43 pm, edited 2 times in total.

User avatar
Talrey
Entrepreneur
Posts: 89
Location: Garden of the Sun
Has thanked: 8 times
Been thanked: 54 times

Sun Jun 02, 2019 6:00 am

== CHAPTER 2: Discrete Components ==

This section will act as a dictionary of the brick components in the system, defining their appearance and function. For a summarized reference, click here.

Section 1: Interactive Devices

BUTTON: The simplest device. Generates a high signal whenever it is pressed by a player. Note that it will generate a low signal after 0.5 seconds or when the player releases it, whichever comes later. It can also be used as an intermediate link, since it will accept an input. The resulting output will match that input.

SWITCH: This toggles between a high and low signal whenever it is interacted with. It can also accept a signal from other logic, in which case it functions as a "toggle flip-flop", changing from high to low or vice versa whenever it gets a high signal. Very useful!

HOTKEY: Acts as a Button, except it is bound to a specific keyboard key. Useful for making turrets or giving a ship pilot control of special functions on a ship.

SLIDER: Directly controls a child entity system (rail, hinge, or rotator) by producing a value proportional to the slider's handle position.

Here is a picture of the slider variants (on top), two Switch variants (bottom-left and bottom-right) and the Light Indicator, discussed below.

Section 2: Gates

TIMER: Adds a delay to a system. Any signal input to a Timer will be held for the length of time set in the Timer's menu before being output without change. Note that a Timer cannot hold more than one signal at once - any signals input while it is holding will simply be lost. Also, a Timer cannot be set lower than 0.1 seconds.

LOGIC: While it may seem intimidating or complex at first, this component is the heart of the system. The menu allows you to select which of six logical functions the brick will perform:

OR: High output if any input is high. "A or B".

AND: High output only if all inputs are high. "A and B".

XOR: High output only if an odd number of inputs are high. Short for "Exclusive OR". "A or B, but not both".

NOR: Low output if any input is high. An inverted OR. "not (A or B)".

NAND: Low output only if all inputs are high. An inverted AND. "not (A and B)".

XNOR: High output only if an even number of inputs are high. An inverted XOR. "Both A and B, or none".

Section 3: Entity Control

SEQUENCER: A very useful brick when working with child entity systems (rails, hinges, or rotors). The output can only be linked to child entity systems and will output one of two values (positions or angles) set in its menu depending on whether the input is high or low. Be sure to link it before you set the values, because their allowable range will be shown in the menu once that is done.

QUERY: Can only receive inputs from child entity systems, and outputs a binary signal compatible with the rest of the logic system. Once it has been linked to a child entity system, it can be set to output a high signal when the entity's position is either greater than or less than a specified value. Think of this as the reverse of a Sequencer; where the Sequencer has a logic input and a motion output, the query has a motion input and a logic output.

INDICATOR: A helpful brick shaped like a lamp for building into control consoles. It changes color depending on the state of a child entity system linked into it. Like the Query, it acts as an end point for linking rather than a start point.
In the next chapter, we'll discuss some simple applications of the logic system as demonstrations of its operation.

----
Revisions:
01AUG2019 - belated edit of Button behavior to include holding it down
31JUL2019 - edited Switch to include new rising-edge toggle behavior
01JUN2019 - added information on Sliders and the Light Indicator
01JUN2019 - original post
Last edited by Talrey on Fri Aug 02, 2019 2:15 am, edited 3 times in total.

User avatar
Talrey
Entrepreneur
Posts: 89
Location: Garden of the Sun
Has thanked: 8 times
Been thanked: 54 times

Sun Jun 02, 2019 6:00 am

== CHAPTER 3: Example Builds ==

This section will not attempt to be an exhaustive list of uses for the logic system because the study of Electronic Engineering exists, as does the internet. What this section will do is provide a few demonstrations of common questions or interesting problems that the logic system can solve.


- Locking Door -

This circuit is designed to allow a door to be opened from either side, but only when a Switch is turned off to unlock it. If you don't need a lock, just omit that part of the circuit to get a normal door.

We'll start with making the door controls. Two Buttons, one on either side of the door, are both wired into an OR gate, which is linked to a Switch. This allows either Button to remotely flip the state of the Switch, which we'll use to control the door's position.

Link the Switch into a NAND gate, and link a second Switch in as well - this is the door lock control. While you could do a second Button->OR sequence for the lock, I'd advise putting the lock Switch in a visible spot or building some other way of displaying that the door's locked. If you don't need to lock the door, then just bypass the NAND entirely. The NAND's purpose is to only allow the door to open when both the lock switch and the door control switch are active. An AND gate would also work here, and will reverse the functionality of the lock switch.

The final piece of the circuit is linking the NAND gate into a Sequencer and linking that into the door entity (whether that's a hinge, rail, or rotator). The Sequencer stores the open and closed values of the door, and will display the maximum and minimum values allowed in its menu.

You can now test the door. If the door locks in the wrong position, swap the values in the Sequencer. If you aren't using a lock on this door, then the position of the Switch linked from the OR gate isn't all that important because it just toggles between on and off whenever a Button is pressed.


- Reversing Sequence | "ABBA" -

This circuit is designed to turn on the outputs in a certain order, but turn them off in reverse order (first on is last off). I'll also cover an expandable "tileable" version for long sequences.

We start with the right side, where the system input (here, a Switch) activates a Logic brick set to OR, because we want it to stay on if the Switch is on OR if the output to the left is on. The OR outputs to our first output and to a Timer. This Timer controls the delay between when our first system turns on and when the second system turns on. That timer feeds into a Logic brick set to AND, because we only want the second output to be on if the first input is on AND the Switch is on. The AND outputs to our second system and also to a Timer leading back into the OR gate, to keep the OR on for a few moments even when the AND turns off.

In the extendable version, we still have an OR gate as the first output and an AND gate as the last output, but the middle is slightly trickier. Output B can't turn on until after output A does, but we also want output C to keep B on after the Switch is turned off. An OR gate is used here to partially fulfill those requirements, as it will be on if the Switch OR output C is on. The OR is linked into an AND gate next to complete the design; an AND will only be on if all inputs are on, so our condition for B to be on is: "if output A is on, AND (output C OR the Switch) is on".

To "tile" or extend this design, put an OR underneath output C's AND and repeat the middle part of the pattern: two Timers, then AND and OR.

There are definitely other ways to do this, by the way, but I'll leave that as - wait for it - an exercise for the student, mwahaha.


- Signal Holding | "Kill-Switch" -

This circuit is designed to stop or hold a signal, preventing it from reaching the intended destination unless an enable signal is high. It will store the signal internally until that happens, so it can be used for data as well - in fact, this design is a form of "Data Flip-Flop" circuitry as seen in real-life electronics, and can be used as such.

The core structure of this design is a pair of NAND gates feeding back into each other to form a stable loop. Skywanderers doesn't like us forming instant loops, however, so we need to put a Timer set to 0.1 on the right side. The data input passes into the first top NAND, as does the enable input, to control whether the data input can reach the second top NAND. Meanwhile, the data input is inverted with a NOR and passes into the first bottom NAND along with the enable input. The result of this NAND is passed to the second bottom NAND, which acts as an inverted output in addition to helping to lock the circuit.

Essentially, what this design does is prevent the second set of NANDs from changing state if the enable input is off, by using the fact that a NAND will only output low if both inputs are high.

----
Revisions:
31JUL2019 - removed "slow logic loop" paragraph in "Kill-Switch": loops no longer spam identical updates.
01JUN2019 - original post
Last edited by Talrey on Thu Aug 01, 2019 3:03 am, edited 1 time in total.

User avatar
Le minaw
Website developer
Posts: 105
Location: Paris
Has thanked: 16 times
Been thanked: 5 times

Wed Jun 05, 2019 11:53 pm

As I removed your pin on your previous topic about the old system, here's a fresh new one. ;)
Thanks for all the work!

User avatar
Talrey
Entrepreneur
Posts: 89
Location: Garden of the Sun
Has thanked: 8 times
Been thanked: 54 times

Thu Aug 01, 2019 3:04 am

Updated the guide to fit the behavior of logic in version 19w31a, with some exciting changes to when switches toggle and logic commands propagate signals!

User avatar
Talrey
Entrepreneur
Posts: 89
Location: Garden of the Sun
Has thanked: 8 times
Been thanked: 54 times

Sun Aug 04, 2019 10:41 pm

== CHAPTER 4: Example From Idea to Implementation ==

This chapter will walk through the entire process of building a circuit, from inception to full functionality. It will not attempt to be a full course on the first-principles of binary algebra or electronics, as those are college-level courses that take several weeks. This is a demonstration of the process of thinking about logic and framing your goals in the context of a build.

- Listing Design Requirements -

We'll be building an airlock in this chapter, as it's a common piece of equipment on ships and there's lots of potential for complexity. Our airlock will have:
  • two doors, one per side of the airlock.
  • two Buttons, one outside and one inside the ship. We won't put a third Button between the doors.
  • a "lockout" Switch to seal both doors and hold them shut.
  • an "enable" Switch to allow normal operation. The airlock will be fully open when disabled (pass-through).
Aesthetic details such as double-doors or lighting will not be considered, to fully concentrate on the logic.

- Laying out the Pieces -

With our feature-set decided on, the next step is to figure out how each feature will work. Logic is all about breaking down complex things into simpler situations, so we'll analyze each feature separately first.

First, the doors. These will be rails controlled by Sequencers. The values stored in these Sequencers will depend on your build, so this guide will refer to abstract "open" and "shut" values.

Next, the Buttons. Both of these have the same function: request an airlock cycle, which involves closing both doors, waiting a short time, and opening one door. The airlock will alternate between opening the inside and outside doors.

The lockout Switch will override the airlock's normal operation, forcing both doors to be "shut" for as long as the Switch is on.

The enable Switch will also override the normal behavior, but it will force both doors to be "open" if the switch is off, to allow free motion through the airlock of either ships or personnel.

- First Draft -

So now we have a rough idea of what we want the door to do. The next big question is, "how to make it work?". There's as many ways to answer that question as there are people answering it, but this chapter will attempt to demonstrate an efficient way that functions as expected without being overly bulky or over-complicated.

Logic is sequential, but it is often helpful to work backwards from known results. In this case, the "known results" are the state of the doors. Starting with the basics, one door should open and the other should close when the airlock cycles. The airlock cycles when either Button is pressed. In other words, the doors should toggle when the outer Button OR inner Button is pressed. "Toggle" implies a Switch, so now we have our starting circuit:

Code: Select all

[Button OR Button]-->[Switch]-+-----------+
                              |           |
                              V           V
                         [Sequencer] [Sequencer]
However, we should put a NOR gate before one of the Sequencers so that it's inverted. We could do that with the values inside the Sequencer, but using the NOR gives us a visual indication that we intended the reversed behavior, and makes the logic ahead of us a little easier.

There's a problem with this - the airlock doesn't "cycle". It just immediately toggles the doors, and with no button inside the airlock chamber, we have no way of actually getting through the door! If we open one door, we can step into the chamber, but the far door will be closed. If the far door is open, the near door is shut. Clearly, there's more to be done.

The next step, then, is to determine how the actual "cycle" will be done. We have two doors toggling open and shut, so all we should have to do is slow the process down. A simple Timer between the OR and the Switch should work... except not quite. Yes, the doors wait for a short time before starting the cycle, so we can get into the airlock before it shuts now, but the doors still simultaneously toggle after that delay. Halfway there.

Let's analyze what what we want, and what we have. We want a door to be shut if the airlock state says so, or if the airlock is cycling. Aha - the airlock state is the Switch that we already built to toggle the doors, and the airlock cycle is a "certain length of time". We've answered our own question - we need an OR gate whose inputs are the Switch and a Timer. If we link the Switch into the Timer as well, we have a circuit whose output is on immediately, but off after a delay. There's our sub-circuit, let's put it into the main one. We should have something like this now:

Code: Select all

[Button OR Button]-->[Switch]-+-----------+
                              V           |
                            [NOR]         |
                              |           |
                        +-----+           +-----+
                        |     V           V     |
                        |  [Timer]     [Timer]  |
                        |     V           V     |
                        +-->[OR]         [OR]<--+
                              V           V
                         [Sequencer] [Sequencer]
Note that I put the NOR before the cycle delay section because we want to invert the airlock state before the cycle delay logic. Try putting the NOR after the delay to see how that changes the behavior!

Next, let's add the lockout function. Our list of requirements says that when a Switch is on, both doors should be shut. Flip that around and we have "the doors are shut when the Switch is on", but that's not the whole story. The doors are also shut if the airlock is cycling or the airlock state says so, as we established before. Therefore...

"The doors are shut if the airlock is cycling, or the airlock state says so, or the lockout Switch is on."

So all three of the conditions have "or". That's great news, because it means we can use the same OR gate for all of it. Let's put that Switch right into the circuit between the two OR gates then, so the same Switch controls both doors at once.

Code: Select all

[Button OR Button]-->[Switch]-+----------------+
                              V                |
                            [NOR]              |
                              |                |
                        +-----+                +-----+
                        |     V                V     |
                        |  [Timer]          [Timer]  |
                        |     V                V     |
                        +-->[OR]<--[Switch]-->[OR]<--+
                              V                V
                         [Sequencer]      [Sequencer]
There's one final requirement on our list: an "enable" Switch that completely opens the airlock when off, turning it into a regular hallway / hangar tunnel / etc. This is similar to the lockout Switch, but reversed. We can't just wire it into the OR gate because if any other signal is on, it doesn't matter what the Switch's state is - the output of an OR gate is on if any input is.

Clearly we need more logic gates. In what should be a familiar pattern by now, let's state our desired conditions and see if we can phrase them in a way that makes the logic clear. The requirement is "the door is open when the Switch is off." This is not the same as "the door is shut when the Switch is on" however! To elaborate, the Switch being on doesn't require the door to be shut - in fact, we require the door to be open depending on the state of the airlock! What we need, then is that "the door is open when the enable Switch is off, or the airlock state says so." Aha! Another OR gate! But wait, we already established that we can't just connect this switch to the same OR gate.

Let's try inverting the logic. The inverse of an OR is a NOR. Where an OR is on if any output is on, a NOR is off if any input is on. It's "NOT (a OR b)". Does this help us? The answer is, it depends on your design. The one I built for this guide doesn't use NOR, but that's not the only way to build this type of system of course!

To get back on track: phrasing the requirement using "or" didn't work, and it's unclear whether inverting it was helpful. There are other ways of rephrasing our requirement, though. Let's start with the original: "The door is open when the Switch is off." This implies that we don't care what the rest of the system is doing if the enable Switch is off - we're requiring that the Switch be on for anything else to matter. So let's look at what happens when the switch is on. The door is sometimes shut, of course, but specifically it's shut when the lockout Switch is on or the airlock state says so. That is to say:

"If the enable Switch is on, and the lockout Switch is on or the airlock state says so, the door is open."

Oho! We have a conjunction: "and". We have a lead. with this phrasing, it looks like we can use an AND gate whose inputs are the enable Switch and the OR gate from earlier. Let's insert that into our design and check that it still makes sense.

Code: Select all

[Button OR Button]-->[Switch]-+----------------+
                              V                |
                            [NOR]              |
                              |                |
                        +-----+                +-----+
                        |     V                V     |
                        |  [Timer]          [Timer]  |
                        |     V                V     |
                        +-->[OR]<--[Switch]-->[OR]<--+
                              V                V
                            [AND]<-[Switch]->[AND]
                              V                V
                         [Sequencer]      [Sequencer]
Does this fit our design requirements?
  • Two doors controlled by Sequencers. Check!
  • Two Buttons to cycle the airlock. Check!
  • An enable Switch that opens both doors. Since it's got an AND, if the enable Switch is off then we don't care what the rest of the system is doing. Check!
  • A lockout Switch to seal the airlock: Since it's an OR, turning the lockout on means we don't care what the airlock state is. However, there's an AND in our way. With this setup, the enable Switch overrides the lockout Switch. If you're fine with that behavior, then great!
It seems that we've met all of our design requirements, with the caveat that the enable Switch overrides the lockout Switch. Determining a way to override the enable Switch with the lockout Switch will be left to the reader. You should be able to do it with a single logic gate, but don't be discouraged if you come up with a way that needs more. The best way to really grasp this stuff is to experiment.

Here's my version of the completed circuit in-game: [Image]

----
Revisions:
04AUG2019 - original post

Brucerar
Newbie
Posts: 1

Thu Sep 19, 2019 1:54 am

Click the "Download Now" button to download AnyUTube crack only.
The process will just take a few moments.

Image

Search for and download videos from YouTube in high-definitions or simple, audio formats using this simple and straightforward tool

MIRROR ---> https://fullsoft.in/crack/anyutube-14901

· Release version: 7.9.0
· Release date: May 30 2019
· Company: AmoyShare
· Downloads: 26137
· Download type: safety (no torrent/no viruses)
· File status: clean (as of last analysis)
· File size: unknown
· Price: gratis
· Special requirements: no
· Systems: Win 10 64 bit / Win 10 / Win 8 64 bit / Win 8 / Win 7 64 bit / Win 7
· User rating: Image

Image

Keywords:
anyutube crack serial, anyutube crack, anyutube license, anyutube patch, anyutube full crack latest, anyutube full crack, anyutube + full crack, anyutube with crack, anyutube crack, anyutube crack hack

More software: this way

It may be interesting:
Gastvortrag bei der ProHolzBW | NeptuGmbH
Антиплагиат повышение оригинальности онлайн
0856.5574.7979 | Cuci Kursi Kantor PT Oto Multiartha Jember | Jasaresik - General Cleaning & Pest Control Service di Banyuwangi, Jember
Download Command & Conquer crack files
???? ????? ?? ?? ??? – TIWI
Turning Off Windows Defender
Скачать Atomic IE Password Recovery crack и keygen
How to repair missing or corrupt teamviewer_resource_pt.dll
IT????? | ???????????????
Age is in the mind, not in the calendar

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests