Jump to content

Delayed output AND gate


Lutris
  • Branch: Live Branch Version: Windows Pending

The output on AND gates lags a tick past their input, which can result incorrect output (as per boolean logic).

Here is an example of an AND gate transitioning from GREEN & GREEN to RED & GREEN:

image.png.f95fc0988308abd2eeabf8c9938c4999.png

As you can see, the gate is incorrectly outputting RED AND GREEN = GREEN.

 

If this is working as designed (I suspect it is), may I request a compact NO-OP gate be added that introduces a single automation tick delay in a signal?  This can be achieved currently with an OR gate with only one signals tied in, but it makes a 2x2 block for something that could be 1x2 and would also be more obvious in purpose when reading circuit diagrams.

I can understand why this is implemented as is, but it was a huge surprise.  I only discovered the problem by pausing at just the right moment.

 

Cheers


Steps to Reproduce
1. Pause the game in sandbox mode 2. Create an AND gate with two inputs and one output 3. Set both inputs GREEN 4. Unpause, pause 5. Set one input RED 6. Step forward one automation tick (I paused at just the right moment) 7. Observe RED & GREEN = GREEN



User Feedback


Further:  I just caught an AND gate turning back GREEN instantly.  Not 100% sure but I think both input signals changed at the same moment. I'm still trying to work out how this works, but the inconsistency of turning on/off feels like it may be a bug.

Here's a screenshot of the whole apparatus; both BUFFER gates are set to the same delay

image.thumb.png.1feb6b4478d0838cce6975cb2707a477.png

(originally tested with mods enabled; verified with mods disabled.  Will try to take a video if I can work out how)

Edited by Lutris

Share this comment


Link to comment
Share on other sites

Hi @Lutris, welcome to the forums!

There's a few things happening here, let me break down what I know and you can let me know if there's still an issue.

First off: There is a bug in the display of the gates in the live version of the game where it almost always processes two automation ticks at once (every 12 frames) instead of the intended once (every 6 frames). This can lead to paradoxical observations where e.g. a wire seems to constantly be red, but a valve it was connected to let some mass through. (Because it had gone green and then red again, but only visually updated to the final red state). That bug will be fixed in the next release (Tomorrow!)

Second: There is indeed a delay in every gate and automation device. Signals "tick" down the network one link at a time, with any given building's output changes occurring one tick after its inputs change. This is by design, but it could be that this is a UI bug: that it wasn't clear that such a behavior would be the case! I do think it might be hard to judge in light of the first issue, so please give it another try after tomorrow's update and let us know if it clears up or still feels like it would have surprised you.

Thanks!

  • Like 2
  • Thanks 1

Share this comment


Link to comment
Share on other sites

Thanks for the quick and detailed response, Ipsquiggle!

I figured that the delay was probably intentional; easy way to solve having to detect the halting problem.  Knowing of that display bug helps a lot, too, to better understand how this works.

I do think making this clear in some way would help a lot - would it be possible to show a gate 'transitioning' somehow? If it's in a mathematically incorrect state (R & G = G, etc) perhaps it could have a little visual indicating that the signals are 'mixing' inside the gate's sprite for those 6 frames?  (instead of loosing sleep over automation, I can loose sleep the next few nights considering UI design.  Both things I love a bit more than is good for me!)

I shall keep an eye out!  I ended up solving my goal without using logic gates (I have a new love of fluid loops with element sensors), but I will give the logic gates more of a go some time and will report back if something looks fishy.  Brothgar's youtube channel has really sparked a new love in me for the game!

Cheers

  • Like 1
  • Thanks 1

Share this comment


Link to comment
Share on other sites

Hello!

I just got the big automation innovation pack.  I love it!  My hats off to the artist who designed the 'what would these gates look like as machines' designs, they're great for anyone not familiar with Boolean logic.

I have a few new suggestions:

image.png.ba83b60854dded249544f6691ce6bb03.png   image.png.6ce63b6d9af2e91ac70a103474e57b4b.png 

The timing on 'machine guts' turning red and green aren't frame-perfect as can be shown in the screenshot above:  the 'guts' show a green pass-through, but the output is still red. It would be wonderful to nail that so that there isn't conflicting visual information.

I did a quick mock-up of what would be my dream UI, where the 'guts' matches the output signal, and also to emphasize the transition by making the 'moving part' yellow both to signal 'between red and green' and to associate with a traffic light's transition color.

image.png.bf4fa2884c9a44fe7074588ce07b7220.png

The white 'silkscreen' labels showing the gates' traditional symbols has been removed.  It would be great to have that back again for those of us who recognize them at a glance, they were super helpful!  There's still a bit of space on most gates where it would fit.

image.png.90e5906442dc8ef9383cd076263f35be.png

The removed symbols did make me notice something I had missed before:  The 'placard' behind the AND gate looks like the symbol for it, but the OR and XOR gates aren't quite right.  The OR gate's butt is correctly dimpled, but it's head is a round like AND.  The XOR looks identical to the OR, but should have an extra tail.  It would be great to adjust those two gates' 'placards' to better match their symbols.

I hope the feedback is useful!  I've lost way too much sleep this past week playing this game.

Cheers!

 

Edited by Lutris
Noticed the NOT gate got re-skinned and that my NOT gate mock-up was redundant, though maybe that's from a mod?
  • Like 1

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...