Can’t recall if I posted the original rendition of Lights Out on this Forum…
This morning, I was able to recreate my Lights Out game concept using a more efficient I/O. The game board is simplified, as shown here:
Gotta say, @g.slender , you’ve made it increasingly easy to design and deploy custom layouts like this. Behind the scenes, “Lights Out 2” makes ample use of Style Overrides (e.g. IF Tile ‘H’ = true THEN display ‘Circle’ icon) and Custom Appearance (e.g. each extreme corner is rounded to 50).
But much more excitingly (for me… not sure this will even make sense to casual users) is what Rule Machine is doing behind the scenes. For each Tile’s “TAP” action, for instance, hubiVue is silently sending a special URL – called a Local End Point trigger – to RM which includes a unique ‘payload’ letting RM know which Tile was tapped (e.g. the value ‘A’ for the upper-left TIle, etc.). Warning: Undocumented HE feature!
RM then executes the corresponding rule without(!) needing a Hub Variable or Connector as an intermediary and updates the game board (via a single Hub Var Conn of type String) to which all 9 Tiles are linked. The var’s (unseen) value reads something like A=false,B=true,C=false,D=true,E=false,F=true,G=false,H=true,I=false
for the game state depicted above.
Gameplay in LO2 is easily 10x if not 50x faster than with the original Lights Out ultraTile, because all of the on/off logic is now maintained internally to RM, using a dozen Local Variables (A through I, plus a few others for processing purposes), instead of LO’s umpteen IF-THENs accompanied by complex string Replace actions. No more clutter of extraneous hub vars or connectors running through Maker API! Mission accomplished after weeks of deliberating about how I could pull that off.