@robotical/robofly-game
v0.1.26
Published
RoboFly uses the same learning-game shell as Jumping Game, Skiing, Maze and Bubble Popper. `src/App.tsx` exports the new `src/learning-game/LearningGame.tsx`; the older Phaser/tutorial sources remain available but are not mounted by the app.
Readme
RoboFly
RoboFly uses the same learning-game shell as Jumping Game, Skiing, Maze and Bubble Popper. src/App.tsx exports the new src/learning-game/LearningGame.tsx; the older Phaser/tutorial sources remain available but are not mounted by the app.
Play and learning flow
The six redesigned activities introduce one thing at a time:
- Hold to fly up. The blocks are ready and the star is above Marty.
- Let go to fly down. First press, then release; the cue changes with the input. The star is below Marty.
- Stay still. A ready-made Do nothing block keeps Marty stationary while a visible star approaches.
- Choose what a press does. A fixed star is visible above Marty before choosing. Select a block and hold to try it.
- Choose what letting go does. A fixed star is visible below Marty before choosing, with an explicit press-before-release cue.
- Fly and catch stars. Ready-made up/down controls, three stars, no obstacles or penalty for a missed star.
Every collected tutorial star counts towards completion. There are no hidden event, edit, timing or hold-position requirements. Early activities show ready-made blocks without edit controls; later activities expose just the one event being explored. Free play keeps both rows editable. Changing a block preserves Marty’s position and the star. Wrong choices can be corrected without resetting the scene. All target positions and motion are authored in the mission, independent of the selected blocks.
Original Robotical artwork, animated hand (including a distinct release motion), Marty palette and short visual cues support non-readers. Speakers read instructions only when tapped. The pause menu has Keep playing, Help, Home and Grown-ups; settings and restarting live in Grown-ups.
Free play unlocks after the activities, or grown-ups can choose it directly. Ten stars offer Keep playing or Skiing. Continuing preserves the board, stars and blocks. Gentle bumps preserve stars; challenge mode offers retry.
The new tutorial uses a learning-v2 save. Existing sound/comfort settings and activity totals/best score carry over; the new activity trail starts at the first lesson. The old save is retained.
Cog and standalone controls
Embedded use defaults to Cog only. Computer controls require an explicit allowScreenControls prop, a non-production build and no Marty host. The standalone development entry supplies that prop.
Pickup appears when starting from home or explicitly setting up a controller. Button input works at any orientation, including flat on a table, and needs no accelerometer readings. Changing orientation never stops flight or reopens pickup. Disconnects pause the game and require setup on reconnect. Tilt never triggers a flight action: press holds the chosen press action, release runs the chosen release action, and Do nothing holds altitude. Pausing or opening a chooser clears held input.
Development
npm start
npm run typecheck
npm run lint
CI=true npm test -- --watch=false --runInBand
npm run build:dev
npm run buildImport @robotical/robofly-game/dist/App from Marty. Link this repository at marty-web-app/node_modules/@robotical/robofly-game; React and ReactDOM must resolve to Marty’s copies. Avoid replacing other linked games when linking this one.
When Marty is already running, rebuild in place to avoid briefly removing its imported files:
NODE_ENV=development ./node_modules/.bin/babel src --out-dir dist --extensions '.tsx' --extensions '.ts' --copy-files --no-copy-ignored --ignore 'src/**/*.test.ts,src/**/*.test.tsx'
./node_modules/.bin/tsc --project tsconfig.dev.jsonThe visual runner (npm run test:visual-phases) targets the new home, chooser, flight, celebration, release lesson and pause screens. It requires Puppeteer locally or in the sibling jumping-game installation.
Validation
Automated tests cover each ready-made lesson, fixed goals and recovery from wrong choices in both coding activities, actual star-contact completion, free play, storage migration, speech opt-in, focus, pause/edit behavior and the Cog connection lifecycle. UI review uses the running standalone game; physical Cog testing is performed in the linked Marty app.
