tsunamayo / Starship-EVO

Welcome to Starship EVO bug tracking repo !
114 stars 17 forks source link

[Suggestion] Logic reversal option #1919

Open Nas0m opened 4 years ago

Nas0m commented 4 years ago

I was trying to make some fancier landing gear using this logic sequence:

However, when the landing gear are switched off, the OFF signal proceeds in the same order. This wouldn't be a problem except that I'm trying to tuck the gear neatly into the hull, and the rotor being delayed the same way by the OFF signal causes the gear to collide with hull. I'd suggest:

  1. a logic block like the sequencer that sends a single input once (ie. the angle) rather than bouncing between ON and OFF states,
  2. a logic reversal block at the beginning or end of the chain that causes the OFF signal to work its way back (using earlier example for reference):
    • landing gear OFF > [rotor OFF > timer > rail OFF]
  3. or maybe make the OFF signal go backwards by default? Not sure about this one though.

logicreversal

Sullos commented 4 years ago

This would be extremely useful. Many people frequently do this, and currently its a bit difficult to do easily. This can be represented by the bug reports we've had reported recently about making an ABBA gate as Talrey would call it. As in it activates A then B, and when turning of goes B then A. Very useful for canopies, doors, and landing gear. If it's possible to have a dedicated logic brick added for this, we would all love it. My suggestion for how it would work would be having a gate that when opened has selections kind of like the logic gate brick, whereas instead of pressing AND, OR, NAND or NOR etc. You would simply set it to A or B or C etc. So you would use it as an intermediary logic brick. Switch links to all of the ABBA gates, then the individual ABBA gates go to whatever they want. Example below. Starship EVO 2020-05-01 20-46-14-451 As shown as example: The switch links to the ABBA gates, each one can simply show an A or B or C or however many things people want linked. When the switch is turned on, it activates A first then B. When turned off it goes in reverse, B then A. This can be expanded maybe up to a max of 8 letters for now. So A B C D E F G H The player can set the ABBA gates to whatever letter they want it to activate in order then deactivate in the opposite order. Thanks

schlid commented 4 years ago

I believe this has been suggested before, numerous times. Previously on the forums when there was more discussion around logic, Tsuna offered the solution of a "controller" logic block long ago which would achieve the function of an ABBA gate, but allowing more than 2 functions in sequence.

This could work quite well with stretchy tech, as stretching the logic block could add extra "stages" to the controller block for an ABCDDCBA circuit and so on.

Unfortunately this would require a decent bit of UI, as for each stage of the circuit there would be the on off options of a sequencer, with the option to input a delay value between stages. On the other hand it would get rid of a lot of unnecessary logic spaghetti and probably be more efficient internally.

stretchy logic controller

ProPeach commented 4 years ago

The "controller" brick is something I've been looking forward to for a while now, ABBA circuits are so common in ships that we often see questions about them over in Discord. Schlid's solution is super cool, and really shows off the power of the stretchy tech. It's well laid out and easy to understand at a glance a bit like the old logic, but still enables complex mechanisms like this to be built with ease.

Could this kind of logic system also help performance? Perhaps it could implement a baking system like turrets to pre-calculate collisions ahead of time, rather than run them in real time.

talrey commented 4 years ago

I like the idea of a stretchy logic brick, haha!

I'm normally against things like this because adding a brick for a single, solvable application is, in my opinion, usually a bad idea unless the specific application is widely used and highly difficult (block-update detection in Minecraft as an example). I feel like it has to be worth the dev time.

However, a stretchy controller adds some really interesting functionality to the game engine (a logic brick with multiple, contextual points of interaction) and solves a highly common issue that is, apparently, difficult. I can make a two-stage sequence in four bricks (six if I need sequencers). This reduces that to the size of three bricks (five if Sequencers are still needed on it).

Final rating: I like it, especially if it only does the timing requirements and leaves the Sequencer as a separate brick (why duplicate functionality?).

Womble-TC commented 4 years ago

I really like your idea schlid, I hope its not too much of a stretch to have that in game.

PopkaAkula commented 4 years ago

A stretchy ABBA circuit would cut down on the amount of space some of my more larger ABBA circuits and make it a lot less cluttered, and to sum it all up:

gimme gimme gimme

tsunamayo commented 4 years ago

Yes I want to to this. I didnt really planned to make a stretched brick as it seems more work for me, but I like the idea. It will be an improvement of the actual sequencer, and yes I want to bake collisions for better perf! This is pretty much a rip off of https://scrapmechanic.gamepedia.com/Controller

Now you can make the thing on yourself, it is one of the first thing we figured out back in the old old day of Skywanderers. I recall the landing gear on my imperial shuttle... You need to use and AND and an OR gate, feeded by your button and your timer. OR goes to A and and goes to B in the ABBA sequence.

ProPeach commented 4 years ago

Sounds awesome! How were you planning on linking the many different systems to it without the stretchy system that Schlid suggested?

tsunamayo commented 4 years ago

You just link all your wanted rotator. Only issue is making sure players knows what number is what rotator. I will try a mix of overlay, the naming feature, and icon generation so you see what your children entity looks like.