Better electricity!

  • g86
    February 2017 Member 0 Permalink

    I agree this is better for a mod or experimental feature.  You could aslo make SPRK" fade out" on normal metals, but not on suerconductors (which could be added as well). Maybe for normal metals, an element called RPET (repeat or repeater) that strenghens a signal. Just ideas.  

  • Veestire
    March 2017 Member 0 Permalink


    In TPT, each pixel has no 'knowledge' of the structures around it - a pixel doesn't 'know' that it's part of a wire. The way it works now, SPRK looks for conductors in the vicinity (neighbouring 20 pixels) of the current sprk, then turns them into sprk as well. To do this, the pixel only has to look at the neighbouring 20 pixels (a circle with radius 2), meaning that only 20 checks have to be made per frame per pixel. In computer science, we call this O(n) time - the number of lookups is proportional to the number of SPRK pixxels, n.

    There would be two ways to implement realistic electronics:

    1. Treat each pixel as a separate circuit element that is connected to the ones immediately adjacent
    2. Use the layout to simplify the circuit into a traditional circuit diagram and use SPICE to simulate it

    For the first approach, the number of 'neighbour lookups' each conductor pixel has to do is constant - it's O(n) as well. Now we need to simulate the resistance, capacitance and inductance of all of these conductor parts. Assuming you find some way to do that satisfactorily - say, leaving a one pixel gap creates capacitance, otherwise it's a resistor, but if it's made of GOLD it acts as an inductor - you still have an extremely complicated circuit, with as many nodes as there are conducting pixels.

    You then have n^2 n-term couples differential equations in need of solving. Analytical solutions are impossible in general, so you'd have to use SPICE to do the numerical simulations. However, these simulations get less reliable with larger circuits - you'll end up with a whole lot of weird behaviour and possibly failures to converge - in other words, it won't work the way you expect it to, and you may as well just use

    The second approach is even more problematic. To even figure out where the wires are would require recursively traversing every single node whenever a conductor is put down - very, very laggy and difficult to get right. Even if it worked, it'd still be slower than current electronics and even they're known to cause significant lag.

    Apart from breaking literally every electronic save on the server, realistic electricity just isn't in keeping with the look and feel of TPT - it's a toy. The electronics are present at logic level only – no high voltages are present.

    TL; DR

    It's a nice idea, but the nails in its coffin are that:
    • It's not really in the spirit of TPT
    • It'd break every save
    • It's very hard to implement at all, and even harder to implement in a performant way

     Then implement a magic button named "BETTER ELECTRONICS"

  • tptquantum
    March 2017 Member 0 Permalink

    It's not really in the spirit of TPT

    It's very hard to implement at all, and even harder to implement in a performant way

  • QuanTech
    March 2017 Member 0 Permalink

    It's a sunny day outside.

  • Tapmemer
    March 2017 Member 0 Permalink

    wires should actually be connected to pass over eachoter instead of being able to jump over to something conductive 1 pixel away

  • NovaStar
    May 2017 Member 0 Permalink

    Try programming that your self. :P