SWCH Bug.

  • ClockBoy
    23rd November Member 0 Permalink

    When making these circuits in the link below, manually, or modifying them in some way (making the activator line longer, making the SWCH longer than 1 pixel.) sometimes the SWCH will stay on when current goes through them instead of the intended toggle behaviour.

    Refreshing and or Reloading the save does not fix the behaviour and they stay on ruining the intended purpose of the circuit. The only solution i have found for this, is to close the game and relaunch it. I cant make heads or tails of it. Happens both on my desktop computer and my laptop after say 10-20 minutes.

     

    https://powdertoy.co.uk/Browse/View.html?ID=3452083

  • LBPHacker
    23rd November Developer 1 Permalink
    This is an update order issue. You can reproduce your issue quickly by creating an upside-down version of your thingy, saving it, and loading it from scratch. The root of the problem is that in some orientations, the sparks through PSCN and NSCN arrive to the SWCH at the same time, and the order of which one it acts on is unspecified. In other orientations, there's a clear order between those sparks, so the problem is not present there.

    You can fix this by delaying the sparks to the NSCN a bit. There will still be differences in update order and in how your circuit works in different orientations and in different situations when you're working on it, but you'll at least force an ordering between these specific sparks.
  • ClockBoy
    24th November Member 0 Permalink

    Thanks!