Skip to content

About

iOS board for use with Looney Pyramids

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LightHouse

LightHouse is an interactive illuminated physical play surface for Looney Pyramids. The screen and the physical plastic pieces together form the interface.

This branch is the clean-sheet Flutter rewrite of the 2025 React / Google AI Studio prototype.

Try it

The current web build is deployed automatically from main:

https://udeudeude.github.io/LightHouse/

The web build requires manual physical calibration because browsers do not reliably expose real-world screen dimensions. Native iOS uses known device geometry where available; native Android uses the device's reported physical DPI when it is plausible, with the same manual fallback.

Current implementation

  • canonical board coordinates stored in physical millimeters
  • automatic physical-size calibration for recognized iPhone models
  • automatic Android calibration from reported physical DPI when trustworthy
  • manual ruler and real-Large-pyramid calibration, plus quick size verification
  • upright Small, Medium, and Large light footprints with full or wall-only illumination
  • flat pyramid footprints
  • double-tap empty board to create a Small footprint
  • double-tap a footprint to cycle Small -> Medium -> Large -> delete
  • loose encirclement gesture around an upright footprint to toggle full/wall illumination
  • exact-footprint one-finger directional drag to tip or stand, without an interaction halo
  • two-finger translate and rotate on touch devices
  • desktop Gestures, Move, and Rotate tools for ordinary mouse or basic trackpad dragging; Shift-drag moves and Option/Alt-drag rotates without changing tools
  • direct orientation controls at 45-degree intervals
  • persistent optional rotation snapping at 15, 30, 45, or 90 degrees, shown by degree ticks inside the menu control
  • optional position snapping to the active underlay
  • underlays for common rectangular grids, Martian Chess, Launchpad 23, a four-board Looney Ludo start, and The Wheel used by Petri Dish / Color Wheel
  • automatic different-size wall-only nesting on overlap
  • internal stack/nest structure records with independently illuminated member footprints and coherent grouped movement
  • deterministic convex-polygon collision pushing across pyramid sizes
  • command-based undo/redo
  • versioned JSON board serialization with migration support
  • debounced local autosave with a user-restorable previous snapshot, named saved boards, and JSON file import/export
  • lower-left hierarchical menu for File, Edit, Boards, Toys, ZENDO, Display, Remote, and Instructions
  • device-specific instructions shown from the lower left
  • Light Lottery theatrical random chooser
  • optional Entropy Delete mode that fades and removes one random footprint every 30 seconds
  • deliberately hidden face-down-only credits on supported motion-enabled devices; they vanish the instant the device is face-up
  • native mobile orientation lock; web uses ordinary browser viewport/orientation behavior without a counter-rotation workaround
  • screen-awake behavior, native application-brightness control, haptics, and safe-board insets
  • installable PWA metadata and iOS Add-to-Home-Screen guidance
  • generated iOS, Android, and web platform runners
  • automated formatting, static analysis, tests, unsigned iOS build validation, Android build validation, and GitHub Pages deployment

Interaction notes

Touch:

  • Double tap empty space: create Small
  • Double tap a footprint: Small -> Medium -> Large -> delete
  • One-finger directional drag across the exact footprint boundary: tip / stand
  • Draw a loose loop around an upright footprint: full <-> wall-only illumination
  • Two-finger drag/twist: translate and rotate
  • Tap: select a footprint for direct orientation commands

Desktop:

  • Double click mirrors double tap
  • Click selects
  • Mouse/trackpad controls are summarized in the in-app Instructions panel for the current device

Board controls:

  • File: New, Open, Restore Previous Autosave, Save, Save a Copy, Rename, JSON import/export
  • Boards: choose an underlay, checker shading, and optional position snapping
  • Edit: undo/redo, 15-degree rotation steps, exact orientation, and persistent rotation snapping
  • Display: size/calibration, brightness, and orientation information
  • Remote: pair a Table Display with one or more Controllers using a shared 6-character code, manage Table Display interaction/visibility/ripple marking, swap roles for single-controller sessions, or disconnect

On a Controller, the thin gray frame marks the full Table Display. The view controls in the upper left zoom from the fitted view to 4×; activate the hand control to drag or pinch the view, then turn it off to manipulate the board. Reset returns to the fitted view. These view adjustments stay on the Controller and do not alter the Table Display's physical board geometry.

A Controller can pair with several Table Displays, each using a different 6-character code. Use the + button in the preview strip to pair another display, tap a preview to make it the active table, or long-press a preview to set its nickname. On wide Controllers, other connected tables appear as larger live previews beside the active framed table. Each paired display keeps its own connection and board snapshot while the Controller is open. Disconnect removes only the active display; the Controller switches to another paired display if one remains.

Zendo's Difficulty menu permits any combination of Easy, Medium, Medium Hard, Hard, and Crazy Hard; only Easy is checked by default. Unchecking all levels leaves no active rule until a level is checked again.

The user-facing Structure menu was removed. Stack/nest relationships remain an internal board concept so physically grouped footprints still move, push, save, restore, and undo correctly.

Remote sessions

A Table Display can be controlled by one or more Controller devices. On each device, open Remote, choose Table Display or Controller, and enter the same 6-character code. Choose opposite roles: exactly one Table Display and one or more Controllers. To add a Controller, use Add Another Controller and enter the existing session code on the new device. With one Controller LightHouse prefers a direct WebRTC data channel; when additional Controllers join, the session switches to the encrypted relay so every Controller shares one table-authoritative state. Controllers render the Table Display's physical board as a scaled control surface, including proportionally scaled Dice Bubble, Zendo Stones, and gun controls. Controller-only Remote controls can enable or disable direct shape interaction on the Table Display, hide/reveal its shapes without changing board state, and mark shapes with persistent normal or dim ripple pulses. Pairing requires an internet connection to the relay service. Previously issued pairing links can still be opened for compatibility, but the interface no longer offers or creates them. Remote application messages use a transport boundary so local-network and Bluetooth transports can be added without changing board synchronization.

Development

The source is a Flutter app. Flutter 3.47 / Dart 3.13 or newer is the current baseline.

flutter pub get
flutter test
flutter run

For iPhone testing, open ios/Runner.xcworkspace in Xcode, choose your Apple development team under Signing & Capabilities, select the connected iPhone, and Run.

Design rule

Canonical board state is expressed in physical millimeters. Screen pixels or Flutter logical pixels belong only at the calibration/rendering boundary.

See docs/architecture.md for design rationale and physical invariants.

License

MIT. See LICENSE.

About

iOS board for use with Looney Pyramids

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages