Example showing how to establish a global direction in a group of blinks

Not a terribly difficult problem, but there are some details. Probably the subtlest gotcha is making sure that you will not form a feedback loop on the transition where a center tile stops being the center because the button is lifted or it is moved.

When you start, all blinks show their local north face in blue. Pressing the button on any blinks makes that blink the “center” and causes all other connected blinks to align to its north and show that in green.

Should work with any size group with total propagation time of <250ms (configurable) and be robust to dynamic topology changes.


Funny enough, this is exactly the heuristic I used in the game I am working on (except I used datagrams for propagation instead of face values). But yes, this is very useful to be able to deal with faces in a consistent way across all connected blinks no matter what they actual physical orientation is.

1 Like