@robotical/maze
v0.1.23
Published
An event → action learning game for ages 4–7, using the same child-facing flow and visual language as Bubble Popper. Children choose original blue action blocks, test yellow tilt events, change a mapping, fix a mixed-up block, then use all four events to
Readme
Marty Maze
An event → action learning game for ages 4–7, using the same child-facing flow and visual language as Bubble Popper. Children choose original blue action blocks, test yellow tilt events, change a mapping, fix a mixed-up block, then use all four events to guide Marty through a maze.
Run locally
npm install
PORT=3021 BROWSER=none npm startThe standalone development entry enables on-screen Cog buttons and arrow keys. Hold an arrow key to move; release to stop. Buttons give a short tilt. The library defaults to real Cog input and never offers computer mode inside Marty, even when a caller passes allowScreenControls.
Test in Marty
npm run build:dev:marty-web-appThis builds and copies the package into ../marty-web-app/node_modules/@robotical/maze, retaining the host's React instance. It does not change npm links for other local packages. Override the destination with MARTY_WEB_APP_DIR if necessary. Re-run after library edits. If a host dev server previously cached missing files, restart that server once.
The host continues importing @robotical/maze/dist/App and providing onExitGame. Connect/select a Cog in Marty before entering Maze. Completion offers Keep playing and Codewheel through the host's games navigator. There are no changes to pairing or native bridge contracts.
Flow and controls
- Play resumes the saved learning trail. Seven completed lessons unlock Free play. Grown-ups can start at any lesson or Free play.
- Original Cog/block artwork, animated tilt demonstrations, a simple first corridor, and a real maze preview replace the text-heavy instructions.
- One action chooser applies immediately. Cog movement never disables the action slot. The maze pauses while editing or viewing menus.
- Pick-up/calibration appears on entering from home or explicitly resetting the controller, and after reconnection. Putting Cog down during a game stops invalid input without reopening setup.
- Hold the Cog level with its button facing up. Tilt left/right/forward/backward; level it to stop. Continuous filtered tilt controls speed, with gentle corridor centring to make turns forgiving.
- Pause offers Keep playing, Help, Home and Grown-ups. Restart, game sounds, reduced motion, sensitivity, progress and support settings live under Grown-ups.
- Narration happens only when a speaker is clicked. Game sounds are separate. Accessible button names, focus trapping, Escape and reduced-motion support stay available.
- Stars score 40 points. Exits score 100, 200, 300, then 400 points. At 1,000 points or four completed mazes, play waits for a choice. Keep playing preserves the score and program and opens the next maze; the completion choice does not repeat during that run.
Validation
npm run typecheck
npm run lint
CI=true npm test -- --watchAll=false --runInBand
npm run build
npm run build:prodThe tests cover all lessons, continuous motion and walls, generated-maze connectivity, completion/continuation, storage, chooser/menu behavior, narration, library controller gating, and simulated raw Cog data including firmware mounting corrections and reconnects.
For a repeatable browser screenshot suite, start the standalone development app, then run npm run test:e2e:visual. Set MAZE_VISUAL_BASE_URL and CHROME_PATH if needed. This suite captures home, lesson, chooser, reward, pause, help, grown-ups and Free play on desktop, tablet, phone portrait and phone landscape.
See implementation and verification notes for the parity audit and remaining physical-device checks.
