How can I fix a subframe device?

  • GeneralElectronics
    13th May 2018 Member 0 Permalink

    So, I made a keyboard that outputs FILT straightaway, along with it, I made a binary decomposer.. thing. This is subframe, but, whenever I stamp-save this, most of the subframe ARAYs don't work, specifically, the ones pointing to the right. My basic solid spark generator configuration is two CONVs, one with the element (INST, PSCN, INWR, etc.) first (leftmost), and then a SPRK CONV (rightmost).

    The ARAYs that do not work look something like this, C being CONV, P being PSCN, A being ARAY and # being empty space.

    CC#

    #PA

    Rebuilding them as making an ARAY pointing up, then flipping so it points down, and finally moving the ARAY to the configuration seen above fixes the issue. But stamping the contraption just breaks everything again. How can I fix this?

  • LBPHacker
    13th May 2018 Developer 0 Permalink

    I can't help with stamps, I've never used them, sorry. What I can help with though is your basic ARAY sites.

     

    First of all I'd suggest reading a tutorial on particle evaluation order. This may sound intimidating, but it's really the only way to learn subframe. Looking at other saves and hoping to be able to throw together something that works and keeps working after you save and reload is not an option. I'm going to recommend mark2222's series; I think reading the first three should be sufficient but, like every good series, it's of the kind that will probably make you read it from cover to cover.

     

     

    So until now I assumed that you weren't aware of particle evaluation order and such, and from now on I'm going to assume that you are, and have read up on it. If you've been aware this entire time, I apologise.

     

    The problem lies in the layout, as is almost always the case with subframe. Try to think about what your particles do. First your left CONV converts the SPRK to PSCN, and your right CONV converts it back, giving it a life value of 4. (I assume your CONVs have tmp configured so as to not kill the ARAY.) Then the SPRK... exists (there's not much sparks do in their update function). Finally the ARAY looks for an SPRK and finds one with a life of 4, which it ignores. It only fires if it sees one with a life of 3.

     

    There, we got the culprit. The solution is as simple as moving the CONVs two spaces down so their update function runs after the ARAY. This way they convert the SPRK back to a SPRK[life=4] after the ARAY fires. In the next frame the life value of SPRK goes from 4 to 3 way before any of the update functions run and that's what the ARAY will end up seeing, and will fire.

     

    Here, hava a demo.

     

    Edited once by LBPHacker. Last: 13th May 2018