Author Topic: Does anyone have a theory for the Logic Bricks addon?  (Read 724 times)

https://forum.blockland.us/index.php?topic=182067.15

That's a pretty neat addon that basically simulates simple circuitry with logic gates and on/off currents. I've been trying to recreate this myself as it's interesting, but I can't hypothesize the algorithm that could do it. I get sending a current down bricks, but if I were to connect a wire onto itself, and then take off the power source, how would I make that power dissipate and not just remain on? My questions aren't with blockland specifically, just with the theory to remake this system myself. Hard to explain.

you could use graphs and connections to diagram the network and check for a power source. each node in the graph (brick, in this case) would contain a reference to the graph and trigger the graph to dissapate energy or whatever when the graph is changed.

look up graphs and trees and graph representations in terms of computer science; id post some stuff myself here but im on mobile and cant conveniently bring up good resources.

what do you even want to do with this
do you want to make a boolean logic simulation? for that you dont need currents or anything like that and it should be relatively simple.
do you want to actually simulate electric circuitry? i find a few problems with that:
1. hard math not suitable for most people, if you can even find articles going over this subject.
2. due to hard math its probably going to be extremely slow for moderate size circuits.
3. barely anyone knows how to actually design electric circuits so nobody would really use this addon for anything. (?)

what do you even want to do with this
do you want to make a boolean logic simulation? for that you dont need currents or anything like that and it should be relatively simple.
do you want to actually simulate electric circuitry? i find a few problems with that:
1. hard math not suitable for most people, if you can even find articles going over this subject.
2. due to hard math its probably going to be extremely slow for moderate size circuits.
3. barely anyone knows how to actually design electric circuits so nobody would really use this addon for anything. (?)

I basically want to recode everything in that addon for myself. I don't need to be super realistic with the amps and voltage stuff, just on/off currents. Some people found it fun on the server that used to be hosted, but I would still like to do it as a challenge for myself.