Variable Pixal Map

  • cyberdragon
    29th May 2013 Member 0 Permalink

    I have discovered the source of lag in my anti-spark (no thanks to any of you! >:( ). It is the fact that it can change it's map range automatically that is causing alot of lag. So I tried putting it in a header to see if that would help (also so I could use it with other elements). It didn't help much. I need a way to make it faster.

     

    http://pastebin.com/Q5MYCQmb is the header

     

    http://pastebin.com/ieG1PmGk is the element

  • mniip
    29th May 2013 Developer 0 Permalink
    that's too much closured o-o
    the variable values would be global, do you realise
  • cyberdragon
    29th May 2013 Member 0 Permalink

    closured?

     

    Yes, I want them global, to A)get them out of being declared in that element and B) to use with new mod elements. But it still causes lag. And this is the only way this element can be useful at all. It has to get an entire line through the conductor to work. But it's cuasing lag in just that element causing it to run out of sync with the rest of the simulation. It mostly works. But not very well on gold and it glitches on powders/liquids and sometimes solids because of this weird phase shift. 

     

    Basically it either needs to be more efficient, or only update the variables at certain intervals so that it can run faster.