Improved "Lights Out 2" game board

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.

1 Like

You are the master of the complex dashboards !!

I’m now worried about the number of dashboards that may end up in the hubiMarket published by the author @LibraSun :laughing: :laughing:

1 Like

Y’know. I also take requests! Anybody?

For grins and giggles, I revisited the “Lights Out Game” concept, this time with hopes of avoiding any Hub Variables, End Point URLs, or other I/O ugliness. But I still needed some mechanism through which I could both send game play moves as well as have hubiVue react to board status.

My solution? A VIRTUAL LOCK! ::snicker, snicker::

Backed by a fairly hairy (but easily deployed and understood) Rule Machine 5.1 rule, game play works impeccably in HV using this setup, using the ultraTile™ shown below: