Skip to content

Add Flappy Mona Redux and MonaOS mode for the Badge Simulator - #169

Open
avni wants to merge 3 commits into
mainfrom
avni-literate-engine
Open

avni wants to merge 3 commits into
mainfrom
avni-literate-engine

Conversation

@avni

@avni avni commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds Flappy Mona Redux, a 320x240 remake of Flappy Mona, and teaches the Badge Simulator canvas to run the whole MonaOS. The original Flappy Mona is untouched.

Flappy Mona Redux (badge/apps/flappy_mona_redux)

  • Full-resolution art for the badge's 320x240 display. tools/build_flappy_mona_redux_assets.py regenerates it by upscaling the original sprites with Scale2x and drawing the new fish, far hills, roller and icon.
  • Fish give Mona 5 seconds of immortality: she glows gold, flies through walls and can rest on the ground. A countdown shows the time left.
  • Brick towers with stairs recur every 3 to 5 walls (roof, steps, hill, steps). Mona climbs the stairs on the left, runs along the top past spikes and rolling drums, then steps down on the right. Hazards are cleared with a jump, and fish float above them. A low tunnel runs beneath each tower for pilots who prefer to fly.

Badge Simulator: MonaOS mode (.github/extensions/badge-simulator)

  • Opening the canvas with { "app": "monaos" } runs the real badge/apps/menu launcher with every app in badge/apps and the files in badge/assets, laid out like the badge's /system volume. Select opens an app, HOME returns to the menu, and changes under either folder rerun it.
  • src/entry.ts adds osLauncher beside the single-app launcher (both share launcherSetup). extension.mjs serves the MonaOS payload, watches both folders, scopes crash reports to the app launched from the menu, and rejects Deploy and check_app for monaos, which need a single app.
  • web/simulator.js is regenerated (see the notes).

Type of change

  • New badge app
  • Improvement or bug fix to an existing app
  • Firmware, menu, or system change
  • Documentation
  • Infrastructure (workflows, scripts, tooling)
  • Universe 2025 (badge25/) maintenance

Badge app checklist

  • The app lives in badge/apps/<name>/ with __init__.py and a 24x24 icon.png
  • README.md starts with a one-sentence description, followed by usage and any hardware or network requirements
  • Uses the 2026 runtime globals (badge, screen, image, ...) and logical buttons such as BUTTON_SELECT
  • Movement and animation are frame-rate independent (badge.ticks_delta)
  • Tested on Universe 2026 badge hardware, including both orientations and the capacitive controls
  • Assets are in assets/, are PNG where possible, and are as small as practical
  • No secrets, tokens, or personal data are committed (badge/secrets.py stays empty)

Screenshots

Captured from the Badge Simulator at the app's 320x240 resolution.

Climbing the roof On the roof deck Immortal
Mona climbing the roof stairs, with spikes on the underside of the roof The roof deck with a spike, a rolling drum and a fish Mona glowing gold with the IMMORTAL label and the 5 second countdown

How to use it

  • Select starts the game. In the air, Select flaps and steers Mona through the gaps in the walls. Once she is running on a tower, Select makes her jump.
  • Grab a fish and Mona is immortal for 5 seconds: she passes through walls and hazards and can rest on the ground. The countdown in the top right shows the time left, and grabbing another fish restarts it.
  • Fly into the stairs on the left of a tower and Mona climbs them on her own, runs along the top, then steps down the stairs on the right. Jump the spikes and rolling drums on the way. A low tunnel runs underneath for pilots who prefer to fly, but the brick and the spikes on its underside are deadly.
  • Your best score is saved on the badge.

Licensing and intellectual property

This is an open source repository released under the MIT License. Everything merged here is distributed under the terms of that license.

We can't accept contributions that use someone else's intellectual property (for example, characters, artwork, logos, trademarks, game names, music, fonts, or code) unless that person or company has agreed to its release under the project license. This includes recognizable likenesses of existing games or brands that could be confusing.

  • I created all code and assets in this PR, or they are already available under an MIT-compatible license and I have credited them in the app README
  • This PR doesn't include third-party characters, logos, trademarks, or other IP, or the owner has agreed to its release under the MIT License
  • I agree that my contribution is licensed under this project's MIT License

Additional notes

Hardware. The app was installed on a Universe 2026 badge over USB mass storage, and the SHA-256 of all 23 installed files matches the repo. It has not yet been play-tested on hardware in both orientations or with the capacitive controls, so that checklist box is left unchecked. Frame rate and memory use at 320x240 are not measured on the device. The art has 4x the pixels of the original, and validate_app.py estimates 454.1 KiB of decoded pixel storage for the 12 PNGs, above its 400 KiB advisory threshold (not a firmware limit). The PNG files themselves total 13.8 KiB on disk and have no lossless headroom left.

Assets and licensing. The PR adds no new third-party assets. The artwork is derived from the repo's existing Flappy Mona sprites, and the fish, far hills, roller and icon are drawn by tools/build_flappy_mona_redux_assets.py. The three licensing boxes are left for the author to confirm.

Menu. No menu change is needed. The menu loads the app's icon.png, and apps missing from APP_ORDER sort alphabetically after the listed ones.

Generated bundle. web/simulator.js is generated (marked linguist-generated, so its diff is hidden). Only the builtAt field of web/BUILD_INFO.json changed, and it is still built from badger/badger.github.io at 2da92a8a89afd551261e7ae7eff8397f7237e093. To reproduce it, run node .github/extensions/badge-simulator/build.mjs --ref 2da92a8a89afd551261e7ae7eff8397f7237e093.

Preview. In the GitHub Copilot app with this repo open, ask for "the Badge Simulator for flappy_mona_redux" (the badge-simulator canvas with { "app": "flappy_mona_redux" }) to play the app. Use { "app": "monaos" } to run the whole OS from the menu.

Validation (run on this branch):

  • python3 .github/scripts/validate_app_readmes.py badge/apps passed ("All app READMEs have a valid description.")
  • python3 .github/skills/hyb26-skill/scripts/validate_app.py badge/apps/flappy_mona_redux passed with 1 advisory warning (the 454.1 KiB estimate above)
  • cd .github/extensions/badge-simulator && node --test recording.test.mjs passed (9 tests, 0 failures)

avni and others added 2 commits November 3, 2026 02:38
Open the canvas with {"app": "monaos"} to run the real menu launcher with
every app in badge/apps and the files in badge/assets, laid out like the
badge's /system volume. Select opens an app and HOME returns to the menu.
Changes under either folder rerun it.

- src/entry.ts: add osLauncher beside the single-app launcher (they share
  launcherSetup) and an os flag on the app payload.
- extension.mjs: serve the MonaOS payload, watch badge/apps and badge/assets,
  scope crash reports to the app launched from the menu, and reject Deploy and
  check_app for monaos, which need a single app.
- Rebuild web/simulator.js with build.mjs from badger.github.io@2da92a8.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A 320x240 remake of Flappy Mona. The original app is left untouched.

- Artwork redrawn for the full display. The tool in
  tools/build_flappy_mona_redux_assets.py regenerates it from the original
  sprites and draws the new fish, hills, roller and icon.
- Fish give Mona 5 seconds of immortality, with a countdown in the corner.
- Brick towers with stairs recur every 3 to 5 walls (roof, steps, hill,
  steps). Mona climbs them, runs along the top past spikes and rolling
  drums, then steps back down. The roof tower has spikes underneath and a
  low tunnel below it for players who prefer to fly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 07:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

MonaOS fails at startup because required menu modules are staged as unsupported .mpy files rather than Python sources at importable paths.

3 open issues
What changed in this PR

Adds Flappy Mona Redux as a separate 320×240 badge game and extends the Badge Simulator with a MonaOS mode for launching apps through the real menu. The original Flappy Mona remains unchanged.

Changes:

  • Adds fish-powered immortality, climbable towers, hazards, camera movement, and saved high scores.
  • Adds a reproducible asset-generation script and gameplay documentation.
  • Adds whole-OS payload loading, folder watching, launcher navigation, and single-app deployment restrictions.
File Description
tools/​build_flappy_mona_redux_assets.py Generates scaled sprites and new artwork.
badge/​apps/​flappy_mona_redux/​world.py Draws scrolling scenery and defines world geometry.
badge/​apps/​flappy_mona_redux/​ui.py Provides text and panel rendering helpers.
badge/​apps/​flappy_mona_redux/​tower.py Defines towers, stairs, hazards, and collisions.
badge/​apps/​flappy_mona_redux/​README.md Documents controls, gameplay, and tuning.
badge/​apps/​flappy_mona_redux/​obstacle.py Implements wall obstacles and collisions.
badge/​apps/​flappy_mona_redux/​mona.py Implements movement, immortality, and death animations.
badge/​apps/​flappy_mona_redux/​fish.py Implements animated collectible fish.
badge/​apps/​flappy_mona_redux/​effects.py Adds sparkles and pickup notifications.
badge/​apps/​flappy_mona_redux/​course.py Sequences obstacles, towers, fish, and scoring.
badge/​apps/​flappy_mona_redux/​__init__.py Coordinates gameplay, camera, HUD, and saved scores.
.github/​extensions/​badge-simulator/​web/​BUILD_INFO.json Updates the bundle build timestamp.
.github/​extensions/​badge-simulator/​src/​entry.ts Adds MonaOS launch flow and mode-aware controls.
.github/​extensions/​badge-simulator/​README.md Documents MonaOS mode and its restrictions.
.github/​extensions/​badge-simulator/​extension.mjs Adds OS payloads, watchers, selection, and diagnostic handling.

Review effort: Balanced

- Treat a return to the MonaOS menu as a new run when reporting errors, so
  get_output no longer shows the previous app's crash after HOME.
- Document that assets the simulator runtime already ships (for example
  badge/assets/icons.png) are read-only there and only show on the badge.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants