Logic System Rework

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    Introduction
    Starmade's logic system is really neat by itself, but when trying to marry a complex array of blocks into a ship of smallish size without compromising its performance, it starts to stink. The capabilities are there. There's lots of options, but it's clunky. Sadface.

    There are two problems.
    1. Size of blocks: Restricts complex logic and display block functions to large or strictly non-combat ships. I appreciate the attempt to go for "everything is made of blocks" but it just doesn't work. Implementing a bar of lights to show shield capacity takes many blocks to do. Other cool stuff usually does as well.
    2. C+V connections: Enough to make a real-life computer engineer pull his hair out. You can't see what gates connect to what if you make a device even remotely compact. Even with it spread out you often can't. Even if you can, it's awkward.
    We need a single block that lets us set up a certain number of inputs and outputs with logical functions between them. We shall call this a "processor" for now. These should connect to one another and to input and output devices. They could even exist alongside the current logic system, although there would be little use for the logic gate blocks at this point.

    Inside a processor
    When activated with R, a processor opens a GUI interface. Along the top are 16 inputs. Along the side are 16 outputs. The center is a grid of points 16 points by 16 points, with the inputs and outputs forming an extra row at the top and an extra column at the side. (Yes, I drew it with blocks. Deal with it. The inputs and outputs should be numbered.)

    starmade-screenshot-0056.png

    Along one side, or the bottom, or wherever, there is a row of controls. From here you can click and drag logic gates onto the grid. Each gate can be rotated so that it outputs in any direction. The other sides may be inputs. Some, like AND, OR can have up to three inputs. You can click the spaces between dots to make "wires." When wires connect, they get a little arrow on them to show direction (which I don't have a way to draw).
    starmade-screenshot-0058.png
    This shows two inputs running into an AND gate, that signal and another input running into an OR gate, and all of it running through a NOT gate to one of the outputs.

    Inside the processor, you can place sensors (which now have their value set by a GUI... grrr.), rail speed controllers, etc. However, things that interact with the outside world (like buttons, lights, rails) must be connected physically to the processor from the outside.

    On the outside
    The processor block can connect to or be connected to other blocks. To do so, I can't think of anything besides the old C+V controls. When the processor is selected, all the inputs and outputs are highlighted (cyan and green, respectively). To connect either an input or output, "V" it.

    When you "V" something, a small GUI comes up with numbers 1-16, which you can cycle through with the scroll wheel. This chooses which input or output to connect the item to. Cycle to the number you want and left-click for an input or right-click for an output. (Some items like lights or area triggers can only be one or the other.) When the processor is selected with C, all inputs and outputs show the numbered "port" they connect to next to their color-coded highlight on the HUD.

    You can connect multiple items to one port. For inputs, this makes the input act like an OR signal of all the things connected. For outputs, it sends the same output signal to all connected devices. The next time you open the connection GUI for this processor, the same number will be highlighted to make connecting several items easier.

    Moar stuff
    • Keep the old logic blocks so as not to break people's old stuff. Besides, if I just want to OR together a few switches to hold one door open, I'd rather just plop down an OR signal rather than deal with a processor.
    • Putting rail orientations or display block text inside a processor would be utterly amazing, but could be added later I guess...
    • Optionally, allow naming ports instead of numbering them. In this case the name would appear in the scrollable connection GUI, highlighted with cyan for input or green for output.
    • We will need a blueprint-like system for saving and sharing processor guts (including any named ports). This could make complex logic more accessible to the community.
    • How about a new block with several buttons on it? Or a touch-screen display module? Something besides meter-wide buttons and switches?
    • Processors within processors? They'd be limited by the number of inputs and outputs on a single block, but it'd still be amazingly epic. You could theoretically build a computer in one block.
    • Anti-lag measures: make logic run on a low-priority thread in the server. If done properly, lag bombs will be completely ineffective at disrupting anything but other logic. Also add admin warnings about entities that cause logic lag.
     

    JumpSuit

    Lost-Legacy Director
    Joined
    Feb 5, 2015
    Messages
    343
    Reaction score
    93
    I see your idea, but phasing out the old logic blocks isn't ideal, it is what makes the game kinda a staple, granted with your idea this 'processor' is one block with this GUI similar to websites utilize, but in my opinion, if something can't fit in a small space, then so be it, it can't fit, don't try to make it fit if it won't ya know? Tackling your 'C+V' issue, Schine could easily replace that part with actual Wires. (I also skimmed your post, so don't flame if i said something you already covered on me lol)
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    I see your idea, but phasing out the old logic blocks isn't ideal
    I'd keep the old logic blocks alongside this system. There are some situations where you only need one gate so it'd be easier to use a regular logic signal block.
    if something can't fit in a small space, then so be it, it can't fit, don't try to make it fit if it won't ya know?
    It's kind of absurd that I can't put even a few logic gates in a single cubic-meter block in a scifi game. Even vacuum tubes are more compact than that in real life! We don't HAVE to be able to fit a 64-bit graphics processor into a single block. It is kind of strange that we can't at least do basic stuff inside one block though.
     

    JumpSuit

    Lost-Legacy Director
    Joined
    Feb 5, 2015
    Messages
    343
    Reaction score
    93
    It's kind of absurd that I can't put even a few logic gates in a single cubic-meter block in a scifi game.
    It isn't absurd, it makes sense.
    Do you have a better idea as to what a logic block's model should look like than a block...? I mean this in the sense that instead of a block model for the logic gates, instead 3D model them, such as with the ability to place multiple gates within one block without obstruction.
     
    Last edited:

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    Nice visual representation! I like it. Fits in with what I wanted a while ago, but still using the engine that generates the universe.

    Somebody recently suggested making the blocks non physical, which would allow for existing logic to exist as they are. Theoretically using non-physical logic you could place them in hall ways or other empty spaces as well as outside the structure altogether.
    The only issue I could see would be around the way the game recognises the size of the structure, but this could be mitigated by having different variables for physical (without logic) and non-physical (with logic) for the game to process structure size, strength, HP etc.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    Somebody recently suggested making the blocks non physical, which would allow for existing logic to exist as they are. Theoretically using non-physical logic you could place them in hall ways or other empty spaces as well as outside the structure altogether.
    That would solve logic taking up space and weight, but then we'd still have the confusing mess of C+V'd together gates and crap. I would prefer the immersion of simply combing a large amount of stuff into a single, perhaps visually-appealing block.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    Even if the block is single-input/single-output, it would be an improvement over existing logic in many cases.

    Or maybe we could have AND and OR circuit blocks with multiple inputs and outputs, where the circuit board type determines what is done with all the inputs, and then all the outputs are the same signal. Yes, AND and OR circuits would be very nice.

    Why multiple separate inputs and outputs shouldn't be implemented: All the help channels (chat, forum, in-game chat, etc.) will be flooded with people who get their inputs and outputs wrong. We, as a community, aren't big enough to support all the problems that multiple-choice channel blocks will create. Plus, it would probably add a ton to the already-bursting blueprint format.
     
    • Like
    Reactions: Lone_Puppy

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    Even if the block is single-input/single-output, it would be an improvement over existing logic in many cases.
    The only devices from the current game you can implement with one input and one output are the NOT and the flip-flop.

    Or maybe we could have AND and OR circuit blocks with multiple inputs and outputs, where the circuit board type determines what is done with all the inputs, and then all the outputs are the same signal. Yes, AND and OR circuits would be very nice.
    We... already have this? You can connect as many items that you want to the AND and the OR signal blocks as you want.

    Why multiple separate inputs and outputs shouldn't be implemented: All the help channels (chat, forum, in-game chat, etc.) will be flooded with people who get their inputs and outputs wrong. We, as a community, aren't big enough to support all the problems that multiple-choice channel blocks will create.
    How is this any different from the current logic system? It's not that hard or confusing. Connect a block to a named or numbered channel, open the GUI, and connect things to the dot with the same name/number written next to it.

    Plus, it would probably add a ton to the already-bursting blueprint format.
    If the blueprint format becomes a problem, it should be reworked. It should not be a limitation on what features can and cannot be implemented.

    I really don't understand your post, bro. Did you read through the parts about the channel numbers coming up when you click the processor block with C? and the connected inputs and outputs being highlighted in different colors? You could screw up, but it would still be less confusing than what we have now.
     

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    We... already have this? You can connect as many items that you want to the AND and the OR signal blocks as you want.
    I think he means have multiple in/output, but they're individual in the way they are connected to the circuit.
    So a single AND block with 2 in/outputs, each would have their own signal value separate from each other but coming from the single block. Similar to your design, but only the one block type.

    I like your design where it allows for multiple in/outputs that can be any kind of circuit.

    I think if we had something like the old 555 IC or it's recent brothers & sisters, that could be handy.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    I think he means have multiple in/output, but they're individual in the way they are connected to the circuit.
    So a single AND block with 2 in/outputs, each would have their own signal value separate from each other but coming from the single block. Similar to your design, but only the one block type.

    I like your design where it allows for multiple in/outputs that can be any kind of circuit.

    I think if we had something like the old 555 IC or it's recent brothers & sisters, that could be handy.
    Yeah, one of those would be nice, but we would need to make it easier for the layman to understand. All we have for timers is those half-second delays... We at least need 0.25 second delays if not 0.1 second delays. Being able to click and drag a delay repeater into a processor and set its delay length would be great.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    The only devices from the current game you can implement with one input and one output are the NOT and the flip-flop.

    We... already have this? You can connect as many items that you want to the AND and the OR signal blocks as you want.
    This whole suggestion is about creating a black box of logic processing, not about re-creating individual logic blocks.
    By simplifying the multiple inputs to be processed as either an AND block or an OR block, you eliminate a whole block from the ship's design, which is huge for smaller ships, which is where this will be the most beneficial to reduce block count.

    Allow me to rephrase "single input/output" as "multiple inputs handled in either an AND or OR fashion, and the same output signal sent to multiple receivers."

    How is this any different from the current logic system? It's not that hard or confusing. Connect a block to a named or numbered channel, open the GUI, and connect things to the dot with the same name/number written next to it.
    The current logic system is confusing and requires that one recreates the same kind of logic path over and over again. It's all too easy, and overly complex to hook up copy-and-pasted chunks of logic blocks wrongly. This suggestion will effectively bring the benefit of "object-oriented programming" to builders.

    If the blueprint format becomes a problem, it should be reworked. It should not be a limitation on what features can and cannot be implemented.

    I really don't understand your post, bro. Did you read through the parts about the channel numbers coming up when you click the processor block with C? and the connected inputs and outputs being highlighted in different colors? You could screw up, but it would still be less confusing than what we have now.
    If the blueprint format becomes a problem, YOUR SUGGESTION WILL NOT BE IMPLEMENTED in favor of easier-to-implement suggestions. With so few developers, you'll want to make things easier on them to maximize the potential of this suggestion.

    You know that ordinary builders will still get confused on the different channels. You know they will demand help. You know they will expect support. It won't matter if it is less confusing. Idiocy will find a way.

    Your misunderstanding is understandable, but it will lead to this being yet another discarded logic suggestion. I'm trying to help, but I don't really care enough to ELI5.
     
    Joined
    Jul 30, 2013
    Messages
    398
    Reaction score
    282
    • Wired for Logic Gold
    • Legacy Citizen 8
    • Purchased!
    As I have said many times before, give the community the right tools, and they themselves will be in charge of teaching the rest of the world.

    At the moment, the logical blocks only have 3 functions:

    - Open and close doors.
    - Know the logical state of other systems (using sensor blocks, dock point state "dock & undock" )
    - Change the status of other systems (shoot weapons, change rails orientation and type of rail, turn lights on & off)

    Anything that gets out of these three pillars, is for love of art, and complicate life itself ...

    Having an "effective" way of reducing the volume of "logical systems" is necessary (at least in my personal opinion), you could build more complex things using minimal space and that would be beneficial for all players.

    An example, someone remembers the times in which we had the display blocks without regex functions? someone used it for something more than "decorate" and put his name in the captain's cabin? remember the BOOM that fled when the regex functions were implemented? ... if not everyone, the players began to investigate new applications, new ways to get the maximum performance to this new improvement, and began to want more things that could interact with each other, to want things to be more complex and occupy less space .

    Thanks to that small / great improvement of a single block, it caused the community to create new content and share it with the other players, and made those people who perhaps, not interested, piqued their curiosity.
     
    • Like
    Reactions: Arcaner
    Joined
    Aug 25, 2013
    Messages
    180
    Reaction score
    43
    I like it, it reminds me of a simple PLD chip. It seems like a good solution to fit logic in a small space without needing programmable computers.
    The blueprint functionality would be very handy, since I often need multiple copies of the same circuit in different locations.
    The multiple inputs/outputs could be tricky as it would probably require rewriting a lot of the logic and linking code. It would be very nice to have though.
    Smaller buttons would be really useful for making door locks and elevator controls without taking up a lot of room.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    Allow me to rephrase "single input/output" as "multiple inputs handled in either an AND or OR fashion, and the same output signal sent to multiple receivers."
    I originally thought you were talking about adding a single block that receives multiple inputs, applies AND or OR to the inputs, and then outputs the result to multiple locations.

    I think you're saying that we should be able to hook single-input devices to multiple inputs and have the block itself act as a gate. In that case it would make the most sense to just use OR to give us a "wired OR" as it is sometimes called in engineering. I think it would be wasteful to add two separate versions of door, light, cannon computer, BOBBY AI, etc. to give us the option of "wired OR" or "wired AND."

    If the blueprint format becomes a problem, YOUR SUGGESTION WILL NOT BE IMPLEMENTED in favor of easier-to-implement suggestions. With so few developers, you'll want to make things easier on them to maximize the potential of this suggestion.
    I don't think we will know whether it's a problem or not without disclosure from Schema on the matter. The other question we should probably ask is, "Does the format need to be changed anyway?" If so, then this idea isn't a problem in itself. Rather it's another reason to fix something that already needed fixing.

    Idiocy will find a way.
    Good point, but I don't think that should put off the development of a good feature. Good youtube tutorials would be a start (Bench could do that), and a good wiki article would also help (I could do that).

    Beyond that, you'd just have to tell the idiots ,"The number next to the glowing connection box when you select the processor block with V matches the number inside the processor GUI. The blue ones go into the processor, and the green ones come out of the processor." If they can't figure it out from that, Rest In Pepperoni, wannabe logic builder.
     

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    A lot of what I've read here reminds me of what I was looking for a while ago. Basically I wanted a universal computer block that has the above functions and more. To manage it, you would kinda drop to a pocket universe to create whatever crazy logic you wanted with input/outputs giving you connectivity to outside this pocket universe. Which is merely the innards of the computer.
    Universal Computer Block

    The key to making this work is both the input/output connectors and the editing environment.

    The editing environment would use the existin universe engine in an empty form to create the logic. This would only need to operate in a build-mode only fashion and would be similar to editing a ship design in a shipyard, but not warping to a remote part of the universe to do it.

    The logic for the computer would then be blueprinted and this blueprint would then need some fancy work by the Dev's to connect to the game somehow.

    I guess it's a too hard basket scenario, but I believe if they could build this it would simplify a whole lot in game for builders and players.
    [doublepost=1504480347,1504479526][/doublepost]Sorry about my Universal Computer post being a bit of a brain dump.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    A lot of what I've read here reminds me of what I was looking for a while ago. Basically I wanted a universal computer block that has the above functions and more. To manage it, you would kinda drop to a pocket universe to create whatever crazy logic you wanted with input/outputs giving you connectivity to outside this pocket universe. Which is merely the innards of the computer.
    That's definitely one way to do it, although I think the grid-based system would be more elegant (and at least to me, more immersive). The key is keeping it simple enough visually that you can see what's going on. Logic blocks in a 3D space don't do that terribly well in my experience. That's why I suggested the grid with wires.

    The key to making this work is both the input/output connectors and the editing environment.
    That's where the OP shines, IMO. Where do you put the I/O connections in a 3D environment? Putting them along one "side" of a theoretically infinite 3D space is... weird. In a limited grid, it works. Sure, you could implement more complex stuff in one block with a limitless 3D space, but when you get that complex, the task is really better suited to a Lua script anyway. (I still want scriptable Lua computers alongside this.)

    Granted, you wouldn't HAVE to limit the size of the grid. You could give the option of resizing it and spreading the I/O pins evenly, or in groups, or keeping them all on one side. Immagine a 64x64 grid with 16 inputs in the upper-left corner and 16 outputs on the lower-right corner. Perhaps "advanced processors" with larger grids could require more resources to craft, or need a unique resource of some kind.
     
    • Like
    Reactions: rocketman221

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    Yeah, I understand 2D would definitely make life simpler. I tend to develop a lot of logic circuits in expanded 2D layouts, but I often end up expanding into 3D.
    I personally tend to visualize in 3D better that 2D also.

    With my suggestion it allows for both.
     

    Asvarduil

    Builder of Very Small Ships
    Joined
    Apr 17, 2015
    Messages
    272
    Reaction score
    133
    • Community Content - Bronze 1
    • Purchased!
    ...Processors!...
    You show a 16x16 processor, but it would also be a good idea for smaller processors to exist too:

    2x2 - shrinks the most basic of complex logic into a controllable block/chip. (e.g. NAND, NOR, XOR)

    4x4 - Useful for slightly more complicated logic

    8x8 - Useful for logic applications that aren't simple, but aren't the most onerous.

    In this way, you could further reduce lag from logic, due some smaller, and cheaper, chips/blocks existing.
     
    • Like
    Reactions: Lord_Greyscale