Programmable Circuits
CD4017BE opened this issue ยท 0 comments
This is what i originally started working on for Automated Redstone which will now go to this mod instead:
My plans for the upcoming Programmable Circuits feature:
- user designs the circuit as a block diagram like seen above
- that gets compiled in Java Virtual Machine byte code that is later loaded into the game as Java class. That class simply extends an abstract template class which serves as API for the rest of my mod to interact with.
- No user controlled gate evaluation order anymore (what were the blue/orange connection lines in AR). Instead variables are used to feed values from one circuit update cycle to the next (gray labeled boxes in the image)
- Debugging interfaces can only show the variable states but not the individual gate outputs anymore (because they only briefly exist on the Java operand stack while the update method is executed). But by usage of "write only" variables the user still has the ability to make selected gate outputs visible for later debugging.
- unlike the image shows, in- and outputs will probably be fixed points on the board instead of components you can drag around and place anywhere.
Some open questions for discussion:
- add back the 8, 16 and 24-bit gate variants or just make everything 32-bit ?
- integer value representing logical TRUE:
1
or-1
or15
or256
or65536
or ... - division by 0 behavior: output a "error value" (like before) or make the circuit crash with a redstone torch burnout.
- add floating point arithmetic gates?