Add an Evaluation Priority to circuit nodes
J
JollyDog
Adding a priority to circuit nodes (chips and other objects with connector pins) is a possible solution to the Ring Evaluation Order problem.
It has been discussed some time ago in discord, as a theoretical concept.
In the meantime RRCS has proven this to be a valid working solution.
It produces a unique correct node evaluation order. Stuff like this will just be not possible: https://recroom.canny.io/bug-reports/p/circuits-different-outcomes-for-different-players-2
And it gives creators control over the evaluation order, in a way that is understandable and predictable. You will no longer have to rebuild your circuit and wire it in a different order in the hopes of creating the correct order by chance. You can just change the priority and modify the evaluation order.
So much for the advantages. Here is a more technical description of what it actually is:
- A single integer that can be found in the chip's/node's settings.
- The integer is unique for the room and there are as many as there are nodes. Therefore it is the same as the node's index in a linear list.
- Changing the priority moves the chip up or down in that list and therefore changes the priorities of other nodes as well, as they are moved around in the list.
- If the circuit evaluation encounters a ring in the graph and has to decide which of multiple possible chips it evaluates first, it takes the chip with the highest evaluation priority.
- Otherwise the priority has no effect.
The algorithm RRCS uses has less than 100 LOC and any programmer should be able to read it without having to understand or read the rest of the project: https://gitlab.com/triplewhy/RRCS/blob/master/src/Assets/Scripts/circuits/CircuitManager.cs
Joker
JollyDog I think Circuits V2 resolves this issue in a general way, although it maybe doesn't provide all the function that you requested. I'm considering closing this request, unless you have a good reason it should stay around.
J
JollyDog
Joker: Hm... I think v2 does this better, and probably doesn't need an explicit evaluation order management. But I didn't analyze it closely enough to completely dismiss this idea myself...
AfewGoodTacos
Corey This is a really badly needed improvement to circuits. Is this on the roadmap to resolve?