Bug: BRAY sends SPRK for 4 frames in FILT

  • cip
    6th Feb 2012 Member 0 Permalink
    When an ARAY is fired entirely through FILT, it sends (or appears to send) SPRK to conductors continuously for 4 frames rather than only on the first frame. The major consequence of this is that it is not feasible to use a SWCH to block BRAYs in FILTs in fast circuits because logic must be added to ensure that an inactive SWCH does not become active for at least 4 frames after the ARAY is fired.

    Additionally, the behavior changes depending on orientation -- even in jacksonmj's beta build with correct spark travel speeds.

    Here are a few examples:


    Example 1 is very basic and is a typical usage scenario. The ARAY in the center activates the SWCHs. The ARAY on the left does not make it through the inactive SWCH, as it shouldn't. The ARAY on the right does pass through the SWCH. Ultimately, this makes it unfeasible to build fast ARAY+FILT circuits that use SWCH for logic and state. 

    Example 2 demonstrates the continuous sparking behavior. Press "Test" to fire all ARAYs at the same time. Each pair of ARAYs delays a different number of frames before activating the SWCH (by use of METL paths of various lengths). Note the first 3 in the FILT version make it through. This is because SPRK is transmitted continuously over multiple frames. Also note, that in the current version of TPT, the first light in the vertical, non-FILT version turns on. This is related to the spark speed bug and is not the problem I am describing - ignore it. Example 2 also has orientation-dependent behavior but the spark speed bug is actually cancelling it out, so you need jacksonmj's beta build to see it (see below).

    Example 3 also demonstrates the continuous sparking behavior, as well as orientation dependence. In the vertical version, only one ARAY makes it through. However, in the horizontal version of example 3, you can clearly see that the FILT+ARAY transmits for 4 frames after it is fired (zoom in on the right side and step one frame at a time).

    In jacksonmj's spark speed beta build:

    Example 1 still fails.

    Example 2: The non-FILT versions function correctly. For the FILT version, the first 2 light up vertically, and the first 3 light up horizontally (spark speed bug allows an extra one to light up in the vertical version, thus hiding this difference).

    Example 3: The vertical version allows one ARAY to pass, the horizontal version allows three ARAYs to pass.

    -C

    P.S. Also note the differences in the length of solid BRAY sections produced in example 3. I do not know what the significance of this is.

  • Pilihp64
    6th Feb 2012 Developer 0 Permalink
    ARAY tries to transmit every single frame that it has a spark next to it (usually 4 because that's how long a spark lasts) and since FILT bypasses the normal BRAY cooldown, it will technically send it on every frame.
  • cip
    6th Feb 2012 Member 0 Permalink
    Interesting. What is the rationale for that -- in what situation would that be of value? Can that not happen? Can ARAY be made to follow spark transmission rules consistent with other conductors? I have run into this behavior repeatedly and it has been a severe limitation on numerous occasions. 

    Also note the orientation-dependence, which in any case, is not correct behavior.

    -C
  • jacksonmj
    6th Feb 2012 Developer 0 Permalink
    I find the argument convincing, I'll go and make ARAY fire once per SPRK.

    However, there will still be some orientation-dependence for ARAY passing through SWCH - if the SWCH is turned on in the same frame as the ARAY fires, the result will depend on the relative positions of the ARAY and SWCH. This would be more difficult to fix, and hopefully it won't be a major problem if the ARAY only fires once.
  • cip
    6th Feb 2012 Member 0 Permalink
    Sweet! Thanks! I agree that any remaining orientation dependence will be less of a problem with this change. You could even view it as a feature (heh) - similar to the left -> right instant-activate SWCH. It may not be ideal in terms of consistency but it does give at least a predictable usage option.

    I'm not sure if this will be useful to you or not but this save can be used to test behavior and orientation dependence for SWCHs activated on the same frame as ARAY. The first, on the left has ARAY, no FILT. The second has FILT adjacent to the ARAYs that go through the SWCH. The third has FILT adj. the ARAYs that activate the SWCH. The fourth has FILT adj. both. Look at the ARAYs shooting out the side to see which ones make it through. Frame step on test to check timings. Also observe relative solid BRAY lengths when "test" is sparked repeatedly.


    Each one contains ARAYs that fire in each direction, as well as a SWCH activated from each side. Reset button electronics and misc. INSLs hidden with decorations for clarity. This save isn't meant to demonstrate anything in particular; it's just for testing.

    Thanks again,

    -C